2 % (c) The GRASP/AQUA Project, Glasgow University, 1995
4 \subsection[showTime.lc]{ClockTime.showsPrec Runtime Support}
11 #if TIME_WITH_SYS_TIME
12 # include <sys/time.h>
16 # include <sys/time.h>
23 showTime(I_ size, StgByteArray d, StgByteArray buf)
30 return (StgAddr)strcpy(buf, "ClockTime.show{LibTime}: out of range");
35 t = - (time_t) ((StgInt *)d)[0];
38 (StgAddr)strcpy(buf, "ClockTime.show{LibTime}: out of range");
41 t = (time_t) ((StgInt *)d)[0];
43 return (StgAddr) strcpy(buf, "ClockTime.show{LibTime}: out of range");
47 if (tm != NULL && strftime(buf, 32 /*Magic number*/, "%a %b %d %T %Z %Y", tm) > 0)
49 return (StgAddr)strcpy(buf, "ClockTime.show{LibTime}: internal error");