2019-07-22 18:15:40 +00:00
|
|
|
import * as core from '@actions/core';
|
2019-09-21 12:56:30 +00:00
|
|
|
import {wait} from './wait'
|
2019-07-22 18:15:40 +00:00
|
|
|
|
|
|
|
async function run() {
|
|
|
|
try {
|
2019-09-21 12:56:30 +00:00
|
|
|
const ms = core.getInput('milliseconds');
|
|
|
|
console.log(`Waiting ${ms} milliseconds ...`)
|
|
|
|
|
|
|
|
core.debug((new Date()).toTimeString())
|
2019-09-25 19:12:51 +00:00
|
|
|
await wait(parseInt(ms));
|
2019-09-21 12:56:30 +00:00
|
|
|
core.debug((new Date()).toTimeString())
|
|
|
|
|
|
|
|
core.setOutput('time', new Date().toTimeString());
|
2019-07-22 18:15:40 +00:00
|
|
|
} catch (error) {
|
|
|
|
core.setFailed(error.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
run();
|