Mercurial > hg > ishara
comparison sched/HRTimer.java @ 2:7357e1dc2ad6
Simplified scheduler library with new schedule representation.
author | samer |
---|---|
date | Sat, 22 Dec 2012 16:17:51 +0000 |
parents | 672052bd81f8 |
children |
comparison
equal
deleted
inserted
replaced
1:289445d368a7 | 2:7357e1dc2ad6 |
---|---|
1 | 1 |
2 package saml.sched; | 2 package saml.sched; |
3 | 3 |
4 public class HRTimer { | 4 public class HRTimer { |
5 | 5 |
6 private static long min_sleep=1000000; // 1 ms | 6 private static long min_sleep=1200000; // 1.2 ms |
7 private static long wake_before=500000; // 0.1ms | 7 private static long wake_before=500000; // 0.5ms |
8 | 8 |
9 public static void setMinimumSleepTime(long t) { min_sleep=t; } | 9 public static void setMinimumSleepTime(long t) { min_sleep=t; } |
10 public static void setWakePrealarm(long t) { wake_before=t; } | 10 public static void setWakePrealarm(long t) { wake_before=t; } |
11 | 11 |
12 public static long now() { return System.nanoTime(); } | 12 public static long now() { return System.nanoTime(); } |