'use strict' ; import { commands } from 'vscode' ; export class TimerUtil { public static setInterval ( command , args , timeout ) { return setInterval ( ( ) => { commands . executeCommand ( command , ... args ) ; } , timeout ) ; } public static cancelInterval ( timeoutObject ) { clearInterval ( timeoutObject ) ; } param { number } milliseconds public static async sleep ( milliseconds ) { await new Promise ( ( resolve ) : any => setTimeout ( resolve , milliseconds ) ) ; } }