1 package DEOS; 20 21 24 class Registry { 25 static final int uSecsInFastestPeriod = 20; 26 static final int uTicksInFastestPeriod = 1; 27 static final int numPeriods = 3; 28 29 static int periodDurationInMicroSecs (int periodIndex) { 30 if (periodIndex == 0) { 31 return uSecsInFastestPeriod; 32 } else { 33 return 3 * uSecsInFastestPeriod * periodIndex; 34 } 35 } 36 37 static int periodDurationInSystemTicks (int periodIndex) { 38 if (periodIndex == 0) { 39 return uTicksInFastestPeriod; 40 } else { 41 return 3 * uTicksInFastestPeriod * periodIndex; 42 } 43 } 44 }; 45 | Popular Tags |