Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions src/components/progress-circle/progress-circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class MdProgressCircle implements OnDestroy {
private _animateCircle(animateFrom: number, animateTo: number, ease: EasingFn,
duration: number, rotation: number) {
let id = ++this._lastAnimationId;
let startTime = now();
let startTime = Date.now();
let changeInValue = animateTo - animateFrom;

// No need to animate it if the values are the same
Expand All @@ -160,7 +160,7 @@ export class MdProgressCircle implements OnDestroy {
} else {
let animation = (currentTime: number) => {
let elapsedTime = Math.max(
0, Math.min((currentTime || now()) - startTime, duration));
0, Math.min((currentTime || Date.now()) - startTime, duration));

this.currentPath = getSvgArc(
ease(elapsedTime, animateFrom, changeInValue, duration),
Expand Down Expand Up @@ -246,17 +246,6 @@ function clamp(v: number) {
}


/**
* Returns the current timestamp either based on the performance global or a date object.
*/
function now() {
if (typeof performance !== 'undefined' && performance.now) {
return performance.now();
}
return Date.now();
}


/**
* Converts Polar coordinates to Cartesian.
*/
Expand Down