aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/utils/utils.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-21 03:47:09 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-21 03:47:09 +0800
commit71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b (patch)
treeaf69b9b067a83d580e6e6d73f9ff42aed37f3354 /packages/0x.js/src/utils/utils.ts
parenta613c3b7e7654728cb56cceb67566ab75313e16f (diff)
downloaddexon-sol-tools-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar
dexon-sol-tools-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar.gz
dexon-sol-tools-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar.bz2
dexon-sol-tools-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar.lz
dexon-sol-tools-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar.xz
dexon-sol-tools-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.tar.zst
dexon-sol-tools-71475d3ceafd8f1a4a76d1e5b49ff0d186bacd9b.zip
Add expirationMarginMs
Diffstat (limited to 'packages/0x.js/src/utils/utils.ts')
-rw-r--r--packages/0x.js/src/utils/utils.ts7
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());
},
};