#include #include #include #include int main () { __int64 ftime; __int64 now; struct { unsigned short len; unsigned short code; __int64 * buff; void * rlen; unsigned long end; } itmlst = {8,SYI$_CLUSTER_FTIME,&ftime,0,0}; unsigned short timlen; char asctim[21]; struct dsc$descriptor timbuf = {20,DSC$K_DTYPE_T,DSC$K_CLASS_S,asctim}; int stat; stat = sys$getsyiw (0,0,0,&itmlst,0,0,0); if (!(stat & 1)) return stat; stat = sys$gettim (&now); if (!(stat & 1)) return stat; ftime -= now; stat = sys$asctim (&timlen , &timbuf , &ftime , 0); if (!(stat & 1)) return stat; asctim[timlen] = 0; printf ("Cluster uptime is %s\n" , asctim); return 1; }