Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add 2 microseconds to Date() js

// get the current date & time (as milliseconds since Epoch)
const currentTimeAsMs = Date.now();

// Add 2 seconds
const adjustedTimeAsMs = currentTimeAsMs + 2;

// create a new Date object, using the adjusted time
const adjustedDateObj = new Date(adjustedTimeAsMs);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #microseconds #js
ADD COMMENT
Topic
Name
7+9 =