[infinispan-issues] [JBoss JIRA] (ISPN-3069) TimeService implementation
Pedro Ruivo (JIRA)
jira-events at lists.jboss.org
Wed May 8 05:36:54 EDT 2013
[ https://issues.jboss.org/browse/ISPN-3069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pedro Ruivo updated ISPN-3069:
------------------------------
Description:
Implementation of the TimeService as described in the mailling list http://lists.jboss.org/pipermail/infinispan-dev/2013-April/012667.html
Interface can be found here: https://github.com/pruivo/infinispan/blob/ISPN-3069/core/src/main/java/org/infinispan/util/TimeService.java
Default implementation will wrap System.nanoTime() and System.currentTimeMillis().
Provide also a no-op implementation?
other suggestions are welcome.
was:
Implementation of the TimeService as described in the mailling list http://lists.jboss.org/pipermail/infinispan-dev/2013-April/012667.html
Interface
{code}
long time() //return the current time in nanoseconds
long wallClockTime() //return the current clock time in milliseconds
long timeDuration(long startTime) //duration between current time and startTime. return value >=0
long wallClockDuration(long startClockTime) //duration between current clock time and startClockTime. it can be negative
long timeDuration(long startTime, long endTime) //duration between endTime and startTime. return value >= 0
long wallClockDuration(long startClockTime, long endClockTime) //duration between startClockTime and endClockTime. it can be negative
//other possible methods
double convertNanosecondsToMicroseconds(long nanos) //convert from nanos to micros without losing precision
double convertNanosecondsToSeconds(long nanos) //convert from nanos to seconds without losing precision
boolean isExpired(long currentWallClock, long endWallClock) //returns true if the endWallClock has expired
{code}
Default implementation will wrap System.nanoTime() and System.currentTimeMillis().
Provide also a no-op implementation?
other suggestions are welcome.
> TimeService implementation
> --------------------------
>
> Key: ISPN-3069
> URL: https://issues.jboss.org/browse/ISPN-3069
> Project: Infinispan
> Issue Type: Feature Request
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Fix For: 5.3.0.Final
>
>
> Implementation of the TimeService as described in the mailling list http://lists.jboss.org/pipermail/infinispan-dev/2013-April/012667.html
> Interface can be found here: https://github.com/pruivo/infinispan/blob/ISPN-3069/core/src/main/java/org/infinispan/util/TimeService.java
> Default implementation will wrap System.nanoTime() and System.currentTimeMillis().
> Provide also a no-op implementation?
> other suggestions are welcome.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list