File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
/* Copyright (c) 2014 Martin Green. See the file LICENSE for copying permission. */
2
2
3
- /** Clock constructor. Apply is used to pass all arguments to the Date
4
- constructor */
3
+ /** Clock constructor. Arguments to this
4
+ are in exactly the same form as those
5
+ to the built-in Date constructor. */
5
6
function Clock ( ) {
6
7
this . lastTime = getTime ( ) ;
7
8
if ( arguments . length > 1 )
@@ -11,6 +12,7 @@ function Clock() {
11
12
else
12
13
this . date = new Date ( ) ;
13
14
}
15
+ exports . Clock = Clock ;
14
16
15
17
/** setClock(milliseconds since 1/1/1970) */
16
18
Clock . prototype . setClock = function ( ms ) {
@@ -25,7 +27,7 @@ Clock.prototype.getDate = function () {
25
27
return new Date ( ( getTime ( ) - this . lastTime ) * 1000 + this . date . getTime ( ) ) ;
26
28
} ;
27
29
28
- exports . Clock = Clock ;
30
+
29
31
30
32
31
33
You can’t perform that action at this time.
0 commit comments