declare var os ; module JS { export class Date { static initial_clock : number = os . clock ( ) ; static initial_time : number = os . time ( ) ; public getHours ( ) { return os . date ( '*t' ) . hour ; } public getMinutes ( ) { return os . date ( '*t' ) . min ; } public getSeconds ( ) { return os . date ( '*t' ) . sec ; } public now ( ) { const clk = os . clock ( ) ; return ( Date . initial_time * 1000 ) + ( math . floor ( ( clk - initial_clock ) * 1000 ) ) ; } } }