genericopenlibs/openenvcore/libc/src/clock_funcs.cpp
branchRCL_3
changeset 54 4332f0f7be53
parent 0 e4d67989cc36
child 56 acd3cd4aaceb
equal deleted inserted replaced
53:9d9daa0f4b62 54:4332f0f7be53
    78 	}
    78 	}
    79 
    79 
    80 	switch(clock_id)
    80 	switch(clock_id)
    81 	{
    81 	{
    82 		case CLOCK_REALTIME:
    82 		case CLOCK_REALTIME:
    83 			//Since Symbian OS is not realtime,we simulate the same using
    83 			//We use TTime::UniversalTime() call to get the Universal time
    84 			//the available wall clock.We use TTime::HomeTime() call to get
    84 			t.UniversalTime();			
    85 			//the wall clock time
       
    86 			t.HomeTime();
       
    87 			err = t.SecondsFrom(UNIX_BASE, iSeconds);
    85 			err = t.SecondsFrom(UNIX_BASE, iSeconds);
    88 			t-=iSeconds;//extracting seconds info into iSeconds
    86 			t-=iSeconds;//extracting seconds info into iSeconds
    89 			if (!err)
    87 			if (!err)
    90 			{
    88 			{
    91 				tp->tv_sec = iSeconds.Int();
    89 				tp->tv_sec = iSeconds.Int();