add GodOfTimeService.tick() to easily increment time
This commit is contained in:
parent
a21a53b9f4
commit
2dfc878445
2 changed files with 25 additions and 2 deletions
|
|
@ -17,12 +17,12 @@ export abstract class TimeService<TTimer extends Timer = Timer> implements OnApp
|
|||
protected constructor() {}
|
||||
|
||||
/**
|
||||
* Returns Date.now()
|
||||
* Returns the current time, in milliseconds since the Unix epoch.
|
||||
*/
|
||||
public abstract get now(): number;
|
||||
|
||||
/**
|
||||
* Returns a new Date instance.
|
||||
* Returns a new Date instance representing the current time.
|
||||
*/
|
||||
public get date(): Date {
|
||||
return new Date(this.now);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue