ARPDAS_QNX6 1.0
timetext.c
Go to the documentation of this file.
00001 #include "tmctime.h"
00002 
00003 char *timetext(long int t) {
00004   static char ts[10];
00005   int hh, h;
00006   
00007   if ( t < 0 ) {
00008         ts[0] = '-';
00009         t = -t;
00010   } else ts[0] = ' ';
00011   t = t % (24*3600L);
00012   ts[9] = '\0';
00013   hh = t % 60;
00014   h = hh % 10;
00015   ts[8] = h+'0';
00016   ts[7] = hh/10 + '0';
00017   ts[6] = ':';
00018   t /= 60;
00019   hh = t % 60;
00020   h = hh % 10;
00021   ts[5] = h+'0';
00022   ts[4] = hh/10 + '0';
00023   ts[3] = ':';
00024   t /= 60;
00025   hh = t % 100;
00026   h = hh % 10;
00027   ts[2] = h+'0';
00028   ts[1] = hh/10 + '0';
00029   return ts;
00030 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines