Calculating millisecond and avoiding float numbers

I have a variable which increases/decreases from 0 to 255 every (X) millisecond. so:

(X) x 255 = time in millisecond / 60000 = minute 

(X) millisecond is a variable which increases only by it self, for example after each button press:

(X) + (X) x 255 = time in millisecond / 60000 = minute (X) + (X) + (X) x 255 = time in millisecond / 60000 = minute etc 

What number should we use in (X) so every time it increases i get +1 minute in output. I want an integer number not a float.

The language is C++ if it helps in anyway…

Log4j2 ‘Unable to move file’ error when using RollingFileAppender with millisecond level rolling

I am trying to configure Log4j2 to roll and log files at a millisecond level granularity.

The configuration (relavant parts) I have used is as follows:

status=error  dest = err  property.filename = logs/dims/$  {env:HOSTNAME}/logging-$  {date:yyyy-MM-dd'T'HH:mm:ss,SSSSS}.log  appenders = console, rolling  ## Rolling File Appender appender.rolling.type = RollingFile = RollingFile appender.rolling.append = true appender.rolling.fileName = $  {filename} appender.rolling.filePattern = logs/dims/$  {env:HOSTNAME}/logging-%d{yyyy-MM-dd'T'HH:mm:ss,SSSS}.log  appender.rolling.policies.type = Policies appender.rolling.policies.time.type = TimeBasedTriggeringPolicy  rootLogger.level = info rootLogger.appenderRefs = console, rolling  rootLogger.appenderRef.console.ref = STDOUT rootLogger.appenderRef.rolling.ref = RollingFile 

The log files are being created at the required granualarity but I see errors in the console as follows:

2019-06-10 10:57:41,689 main ERROR Unable to move file /mnt/c/dims/logs/dims/dsp/logging-2019-06-10T10:57:31,00358.log to /mnt/c/dims/logs/dims/dsp/logging-2019-06-10T10:57:41,0587.log: java.nio.file.NoSuchFileException /mnt/c/dims/logs/dims/dsp/logging-2019-06-10T10:57:31,00358.log -> /mnt/c/dims/logs/dims/dsp/logging-2019-06-10T10:57:41,0587.log

But the two files logging-2019-06-10T10:57:31,00358.log and logging-2019-06-10T10:57:41,0587.log in the error are present when I do an ls.

Can someone help me with understanding what is causing this error and how to prevent it?

Pure JS countdown clock not converting millisecond time correctly

I have a semisimple pure js countdown clock that I am having trouble converting the millisecond time correctly.

Here is a working Plunker (besides the date counter)

It Should only be 38 days instead of 184.

//// Should Countdown till feb, 4th 2019 /////  let cd = new Countdown({   cont: document.querySelector(".container"),   endDate: 1549263600000,   outputTranslation: {     year: "Years",     week: "Weeks",     day: "Days",     hour: "Hours",     minute: "Minutes",     second: "Seconds"   },   endCallback: null,   outputFormat: "day|hour|minute|second" }); 

Thank’s I appreciate the help!