Skip to content

Commit

Permalink
chore!: Stop inspecting UNDERTAKER_TIME_RESOLUTION environment variab…
Browse files Browse the repository at this point in the history
…le (#98)
  • Loading branch information
sttk authored Sep 3, 2023
1 parent b270c28 commit e255fc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 e255fc7

Please sign in to comment.