// generate random number based off current time public static int RandNum(int max) { int d1 = RTC.GetHour() + 1; int d2 = RTC.GetMinute() + 1; int d3 = RTC.GetSecond() + 1; int rand = ((d1 * d2 * d3) % max); return(rand); }