Question d’entretien chez Sharegain

Implement a wait(sec) function in Javascript without using the event loop (settimeout, setinterval etc). The wait function should delay the main thread by 'sec'