aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/utils/utils.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-11-23 02:02:31 +0800
committerGitHub <noreply@github.com>2017-11-23 02:02:31 +0800
commit0e03ef385b03f5b2f916f38001553b1c1c18c383 (patch)
tree441b43cdfd5965312a27f41e7f9c91823cc45e2e /packages/0x.js/src/utils/utils.ts
parent66750f7349435dbcdb783a214e21800466ec3ac1 (diff)
parentac2c723ec9044589ad6495f4fd915db1f9eda3a7 (diff)
downloaddexon-0x-contracts-0e03ef385b03f5b2f916f38001553b1c1c18c383.tar.gz
dexon-0x-contracts-0e03ef385b03f5b2f916f38001553b1c1c18c383.tar.zst
dexon-0x-contracts-0e03ef385b03f5b2f916f38001553b1c1c18c383.zip
Merge pull request #227 from 0xProject/feature/orderExpired
Add expirationWatcher
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());
},
};