com.dalsemi.system
Class Clock

java.lang.Object
  |
  +--com.dalsemi.system.Clock

public class Clock
extends java.lang.Object

This class provides access to the TINI Real-Time clock. The methods support setting and getting the clock values. Getting the time involves calling getRTC() and then accessing the public static ints (i.e. year, month, hour,...) to get the clock values. Setting the time involves setting the public static ints (i.e. year, month, hour, ...) and then calling setRTC(). This class will be modified at a later date to conform to Java clock/calendar classes.


Field Summary
static int date
          Day of the month
static int day
          Day of the week
static int hour
          Hour
static int hundredth
          Hundreths of seconds
static boolean is12Hour
          12/24 hour flag
static int minute
          Minute
static int month
          Month
static boolean pm
          PM/AM flag
static int second
          Second
static int year
          Year mod 100
 
Constructor Summary
Clock()
          Constructor
 
Method Summary
static void getRTC()
          Reads Real time clock values from hardware clock and places them into Clock static fields.
static int getTickCount()
          Get the current time in milliseconds.
static void setRTC()
          Reads real time clock values from static ints and writes them to the hardware clock.
 
Methods inherited from class java.lang.Object
equals, hashCode, toString
 

Field Detail

year

public static int year
Year mod 100

month

public static int month
Month

day

public static int day
Day of the week

date

public static int date
Day of the month

hour

public static int hour
Hour

minute

public static int minute
Minute

second

public static int second
Second

hundredth

public static int hundredth
Hundreths of seconds

pm

public static boolean pm
PM/AM flag

is12Hour

public static boolean is12Hour
12/24 hour flag
Constructor Detail

Clock

public Clock()
Constructor
Method Detail

getRTC

public static void getRTC()
Reads Real time clock values from hardware clock and places them into Clock static fields.

getTickCount

public static int getTickCount()
Get the current time in milliseconds.
Returns:
Millisecond time.

setRTC

public static void setRTC()
Reads real time clock values from static ints and writes them to the hardware clock.