SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { timer } from '@toby.mosque/utils'
  2. const timestamp = function (date) {
  3.   date = date || new Date()
  4.   return JSON.stringify({ time: date.getTime(), iso: date.toISOString() })
  5. }
  6. export default async (context) => {
  7.   console.log('start: ', timestamp())
  8.   await timer.sleep(5000)
  9.   console.log('end: ', timestamp())
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top