diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-21 03:47:09 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-21 03:47:09 +0800 |
commit | 71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b (patch) | |
tree | af69b9b067a83d580e6e6d73f9ff42aed37f3354 /packages/0x.js/src/utils/utils.ts | |
parent | a613c3b7e7654728cb56cceb67566ab75313e16f (diff) | |
download | dexon-0x-contracts-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar.gz dexon-0x-contracts-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar.zst dexon-0x-contracts-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.zip |
Add expirationMarginMs
Diffstat (limited to 'packages/0x.js/src/utils/utils.ts')
-rw-r--r-- | packages/0x.js/src/utils/utils.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/0x.js/src/utils/utils.ts b/packages/0x.js/src/utils/utils.ts index 280f3e979..5370c3b4b 100644 --- a/packages/0x.js/src/utils/utils.ts +++ b/packages/0x.js/src/utils/utils.ts @@ -49,7 +49,10 @@ export const utils = { const hashHex = ethUtil.bufferToHex(hashBuff); return hashHex; }, - getCurrentUnixTimestamp(): BigNumber { - return new BigNumber(Date.now() / 1000); + getCurrentUnixTimestampSec(): BigNumber { + return new BigNumber(Date.now() / 1000).round(); + }, + getCurrentUnixTimestampMs(): BigNumber { + return new BigNumber(Date.now()); }, }; |