Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101448938
milliseconds.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 10, 14:19
Size
588 B
Mime Type
text/x-c++
Expires
Wed, Feb 12, 14:19 (2 d)
Engine
blob
Format
Raw Data
Handle
24149426
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
milliseconds.js
View Options
'use strict'
;
const
DatePart
=
require
(
'./datepart'
);
class
Milliseconds
extends
DatePart
{
constructor
(
opts
=
{})
{
super
(
opts
);
}
up
()
{
this
.
date
.
setMilliseconds
(
this
.
date
.
getMilliseconds
()
+
1
);
}
down
()
{
this
.
date
.
setMilliseconds
(
this
.
date
.
getMilliseconds
()
-
1
);
}
setTo
(
val
)
{
this
.
date
.
setMilliseconds
(
parseInt
(
val
.
substr
(
-
(
this
.
token
.
length
))));
}
toString
()
{
return
String
(
this
.
date
.
getMilliseconds
()).
padStart
(
4
,
'0'
)
.
substr
(
0
,
this
.
token
.
length
);
}
}
module
.
exports
=
Milliseconds
;
Event Timeline
Log In to Comment