Improve movement
This commit is contained in:
parent
e01400058d
commit
9e35538b79
13 changed files with 164 additions and 125 deletions
|
|
@ -9,4 +9,12 @@ export class DeltaTimeCalculator {
|
|||
|
||||
return seconds * 1000 + nanoSeconds / 1000 / 1000;
|
||||
}
|
||||
|
||||
public getDeltaTimeInMilliseconds(): number {
|
||||
const deltaTime = process.hrtime(this.previousTime);
|
||||
|
||||
const [seconds, nanoSeconds] = deltaTime;
|
||||
|
||||
return seconds * 1000 + nanoSeconds / 1000 / 1000;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue