Skip to content

Commit

Permalink
update: remove UNDERTAKER_TIME_RESOLUTION
Browse files Browse the repository at this point in the history
  • Loading branch information
sttk authored and phated committed Sep 3, 2023
1 parent b270c28 commit 9ec53b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 2 additions & 4 deletions README.md
Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions lib/last-run.js
Expand Up @@ -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);
Expand Down

0 comments on commit 9ec53b0

Please sign in to comment.