self.onmessage = function({data}) {
    console.log(data)
    let time = new Date()
    try {
        setInterval(() => {
            time = new Date()
            self.postMessage(time)
        }, 1 * 1000)
    } catch(error) {
        console.log(error)
    }
}