Changed doctor username. Added milliseconds to date

This commit is contained in:
2015-10-09 20:48:53 +02:00
parent 5c5048f362
commit 2334a52633
3 changed files with 12 additions and 4 deletions
+2 -1
View File
@@ -23,7 +23,7 @@ namespace ErgometerLibrary
{
BinaryWriter writer = new BinaryWriter(stream);
writer.Write(1);
writer.Write("p4tp140t");
writer.Write("Doctor0tVfW");
writer.Write("password");
}
}
@@ -55,6 +55,7 @@ namespace ErgometerLibrary
using (File.Create(Path.Combine(GetSessionChat(session)))) ;
File.WriteAllText(GetSessionFile(session), naam + Environment.NewLine + Helper.Now);
Console.WriteLine("Created session at " + Helper.MillisecondsToTime(Helper.Now));
}
public static void WriteMetingen(int session, List<Meting> metingen)
+8 -1
View File
@@ -8,6 +8,13 @@ namespace ErgometerLibrary
{
public class Helper
{
public static double Now { get { return (DateTime.Now - DateTime.Parse("1/1/1870 0:0:0")).TotalMilliseconds; } }
public static double Now { get { return (DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds; } }
public static string MillisecondsToTime(double millis)
{
DateTime time = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
string timestr = time.AddMilliseconds(millis) + "";
return timestr;
}
}
}
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.6")]
[assembly: AssemblyFileVersion("1.0.2.6")]
[assembly: AssemblyVersion("1.0.2.8")]
[assembly: AssemblyFileVersion("1.0.2.8")]