added results
This commit is contained in:
1 parent
586c476851
commit
bae0e2218e
11 files changed
+617
-5
No files matched your search
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace Code.Records
|
||||
{
|
||||
[Serializable]
|
||||
public class Record
|
||||
{
|
||||
public string name;
|
||||
public long totalMilliseconds;
|
||||
|
||||
public Record(string name, long ms)
|
||||
{
|
||||
this.name = name;
|
||||
totalMilliseconds = ms;
|
||||
}
|
||||
|
||||
public string formattedTime => FormatTime(totalMilliseconds);
|
||||
|
||||
private string FormatTime(long ms)
|
||||
{
|
||||
var minutes = ms / 60000;
|
||||
var seconds = ms % 60000 / 1000;
|
||||
var milliseconds = ms % 1000;
|
||||
return $"{minutes:D2}:{seconds:D2}:{milliseconds:D2}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user