@@ -151,7 +151,7 @@ export class MdProgressCircle implements OnDestroy {
151
151
private _animateCircle ( animateFrom : number , animateTo : number , ease : EasingFn ,
152
152
duration : number , rotation : number ) {
153
153
let id = ++ this . _lastAnimationId ;
154
- let startTime = now ( ) ;
154
+ let startTime = Date . now ( ) ;
155
155
let changeInValue = animateTo - animateFrom ;
156
156
157
157
// No need to animate it if the values are the same
@@ -160,7 +160,7 @@ export class MdProgressCircle implements OnDestroy {
160
160
} else {
161
161
let animation = ( currentTime : number ) => {
162
162
let elapsedTime = Math . max (
163
- 0 , Math . min ( ( currentTime || now ( ) ) - startTime , duration ) ) ;
163
+ 0 , Math . min ( ( currentTime || Date . now ( ) ) - startTime , duration ) ) ;
164
164
165
165
this . currentPath = getSvgArc (
166
166
ease ( elapsedTime , animateFrom , changeInValue , duration ) ,
@@ -246,17 +246,6 @@ function clamp(v: number) {
246
246
}
247
247
248
248
249
- /**
250
- * Returns the current timestamp either based on the performance global or a date object.
251
- */
252
- function now ( ) {
253
- if ( typeof performance !== 'undefined' && performance . now ) {
254
- return performance . now ( ) ;
255
- }
256
- return Date . now ( ) ;
257
- }
258
-
259
-
260
249
/**
261
250
* Converts Polar coordinates to Cartesian.
262
251
*/
0 commit comments