From e255fc7c9be27d11dc8a711a3f15e058040e712c Mon Sep 17 00:00:00 2001 From: Takayuki Sato Date: Mon, 4 Sep 2023 08:40:55 +0900 Subject: [PATCH] chore!: Stop inspecting UNDERTAKER_TIME_RESOLUTION environment variable (#98) --- README.md | 6 ++---- lib/last-run.js | 4 ---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4b79fca..d263700 100644 --- a/README.md +++ b/README.md @@ -134,14 +134,12 @@ should probably be re-run from scratch to get into a good state again. The timestamp is always given in millisecond but the time resolution can be rounded using the `precision` parameter. The use case is to be able to compare a build time -to a file time attribute. On node v0.10 or with file system like HFS or FAT, -`fs.stat` time attributes like `mtime` precision is one second. +to a file time attribute. Assuming `undertakerInst.lastRun('someTask')` returns `1426000001111`, `undertakerInst.lastRun('someTask', 1000)` returns `1426000001000`. -The default time resolution is `1000` on node v0.10, `0` on node 0.11+ but -it can be overwritten using `UNDERTAKER_TIME_RESOLUTION` environment variable. +The default time resolution is `1`. ## Custom Registries diff --git a/lib/last-run.js b/lib/last-run.js index 2d30960..db50768 100644 --- a/lib/last-run.js +++ b/lib/last-run.js @@ -5,10 +5,6 @@ var retrieveLastRun = require('last-run'); var metadata = require('./helpers/metadata'); function lastRun(task, timeResolution) { - if (timeResolution == null) { - timeResolution = process.env.UNDERTAKER_TIME_RESOLUTION; - } - var fn = task; if (typeof task === 'string') { fn = this._getTask(task);