aboutsummaryrefslogblamecommitdiffstats
path: root/packages/contract-wrappers/src/utils/utils.ts
blob: 689a7ee0a47e370ec07ea8a45ce1de86cda27ac3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                             
 
                      
                                             

                                                                       



                                            
  
import { BigNumber } from '@0xproject/utils';

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