initial commit (migrated)
This commit is contained in:
commit
b594facb51
143 changed files with 11057 additions and 0 deletions
13
lib/core/time.dart
Normal file
13
lib/core/time.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/// Humble class for time related operations.
|
||||
abstract class Time {
|
||||
/// Get unix timestamp in seconds.
|
||||
int getUnixTimestamp();
|
||||
}
|
||||
|
||||
/// Implementation of [Time] using [DateTime].
|
||||
class TimeImpl implements Time {
|
||||
@override
|
||||
int getUnixTimestamp() {
|
||||
return DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue