public void setToCurrentTime() { this.seconds = 0; this.nanoseconds = RealtimeNative.getCurrentTimeNative(); normalize(); }
@Override public void getNextTriggerTime(MonotonicTime timeToPack) { long timestamp = RealtimeNative.getNextPeriod(threadID); timeToPack.set(0, timestamp); }
public long waitUntil(MonotonicTime time) { return RealtimeNative.waitUntil(threadID, time.seconds(), time.nanoseconds()); }
public void setNextPeriod(MonotonicTime nextControllerTrigger) { RealtimeNative.setNextPeriod(threadID, nextControllerTrigger.seconds(), nextControllerTrigger.nanoseconds()); }
public ThreadInterface createThread(Runnable runnable, String name) { RealtimeThread realtimeThread = new RealtimeThread(priorityParameters, periodicParameters, runnable, name); if(processors != null && processors.length > 0) { realtimeThread.setAffinity(processors); } return realtimeThread; }
public MonotonicTime(long seconds, long nanoseconds) { this.seconds = seconds; this.nanoseconds = nanoseconds; normalize(); }
/** * Uses CLOCK_REALTIME to get the current time * @return gets the wall time in nanoseconds since the unix epoch */ public long getCurrentRealtimeClock() { return RealtimeNative.getCurrentRealtimeClockTimeNative(); }
@Override public void run() { int run = 1; do { perform(run++); } while (endless); } };
/** * Get a monotonically increasing time value in nanoseconds * * @return monotonically increasing time in nanoseconds since arbitrary epoch */ public static long getCurrentMonotonicClockTime() { return RealtimeNative.getCurrentTimeNative(); }
/** * Locks all pages mapped into the address space of the calling process using mlockall(). */ public static void lock() { RealtimeNative.mlockall(); }
@Override public void shutdown() { thread.shutdown(); }
@Override public void finalize() { RealtimeNative.destroy(threadID); } }
@Override public void getNextTriggerTime(MonotonicTime timeToPack) { long timestamp = RealtimeNative.getNextPeriod(threadID); timeToPack.set(0, timestamp); }
public long waitUntil(MonotonicTime time) { return RealtimeNative.waitUntil(threadID, time.seconds(), time.nanoseconds()); }
public void setNextPeriod(MonotonicTime nextControllerTrigger) { RealtimeNative.setNextPeriod(threadID, nextControllerTrigger.seconds(), nextControllerTrigger.nanoseconds()); }
public void setToCurrentTime() { this.seconds = 0; this.nanoseconds = RealtimeNative.getCurrentTimeNative(); normalize(); }
public void set(long seconds, long nanoseconds) { this.seconds = seconds; this.nanoseconds = nanoseconds; normalize(); }
public MonotonicTime(long seconds, long nanoseconds) { this.seconds = seconds; this.nanoseconds = nanoseconds; normalize(); }
public void subNanoseconds(long nanoseconds) { this.nanoseconds -= nanoseconds; normalize(); }
public void subNanoseconds(long nanoseconds) { this.nanoseconds -= nanoseconds; normalize(); }