Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
d3-timer 0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed May 13, 2016
1 parent eac64f7 commit 05ddc31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions d3-timer.v0.4.js
Expand Up @@ -4,7 +4,7 @@
(factory((global.d3_timer = global.d3_timer || {})));
}(this, function (exports) { 'use strict';

var version = "0.4.3";
var version = "0.4.4";

var frame = 0;
var timeout = 0;
Expand All @@ -16,7 +16,9 @@
var clockNow = 0;
var clockSkew = 0;
var clock = typeof performance === "object" ? performance : Date;
var setFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : function(callback) { return setTimeout(callback, 17); };
var setFrame = typeof requestAnimationFrame === "function"
? (clock === Date ? function(f) { requestAnimationFrame(function() { f(clock.now()); }); } : requestAnimationFrame)
: function(f) { setTimeout(f, 17); };
function now() {
return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
}
Expand Down
2 changes: 1 addition & 1 deletion d3-timer.v0.4.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 05ddc31

Please sign in to comment.