liquidator/src/utils.ts

18 lines
318 B
TypeScript
Raw Normal View History

2021-03-13 15:24:23 -08:00
import axios from 'axios';
export function notify(content) {
if (process.env.WEBHOOK_URL) {
axios.post(process.env.WEBHOOK_URL, {content});
}
}
2021-03-09 05:32:07 -08:00
export function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export const getUnixTs = () => {
return new Date().getTime() / 1000;
2021-03-13 15:24:23 -08:00
}