open-dis-java icon indicating copy to clipboard operation
open-dis-java copied to clipboard

DIS time converter

Open joshserrin opened this issue 6 years ago • 4 comments

We provide DisTime to convert System.currentimemillis to dis time but not a conversion back. Ideally, given a pdu time, get the millis since epoch equivalent. Does this library provide that or is anyone aware of the java code that successfully does the conversion?

joshserrin avatar May 15 '19 00:05 joshserrin

Hi @joshserrin , it sounds like it could be a useful addition to the DisTime class. Would you like to submit a pull request?

leif81 avatar May 15 '19 01:05 leif81

I don't have an implementation right now but if I write one I'll submit a PR. I'm just curious if other have implemented this function already.

A better description of the function would be 'Given a pduTime, convert to the millis since the top of the hour (since pduTimes are only relative to the hour)'.

joshserrin avatar May 15 '19 12:05 joshserrin

Suggesting the attachment as an augmentation to ClockTime. It could go in DisTime, but this is where I would have expected it.

ClockTime.java.txt

a-keleher avatar Mar 22 '23 19:03 a-keleher

@a-keleher sorry for the long delay. Would you be able to submit this as a pull request so that the proposed change can be reviewed?

leif81 avatar Dec 22 '23 10:12 leif81