aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/utils/utils.ts
blob: a7d10aaf9a174e17e6994bc47a519e8d5664a48f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import { BigNumber } from '@0x/utils';

export const utils = {
    getCurrentUnixTimestampSec(): BigNumber {
        const milisecondsInASecond = 1000;
        return new BigNumber(Date.now() / milisecondsInASecond).round();
    },
    getCurrentUnixTimestampMs(): BigNumber {
        return new BigNumber(Date.now());
    },
};