Refactor and remove moment.js usages
This commit is contained in:
@ -32,7 +32,7 @@ export default function increaseTime(duration) {
|
||||
* @param target time in seconds
|
||||
*/
|
||||
export function increaseTimeTo(target) {
|
||||
let now = latestTime().unix();
|
||||
let now = latestTime();
|
||||
if (target < now) throw Error(`Cannot increase current time(${now}) to a moment in the past(${target})`);
|
||||
let diff = target - now;
|
||||
return increaseTime(diff);
|
||||
|
||||
Reference in New Issue
Block a user