gettime 公用程式是由 PROBE 程式使用的 C 程式,用來追蹤在探測重新啟動之間的持續時間。您必須編譯此程式,並將其置於與回呼方法相同的目錄中,即 RT_basedir 特性指向的目錄。
#
# This utility program, used by the probe method of the data service, tracks
# the elapsed time in seconds from a known reference point (epoch point). It
# must be compiled and placed in the same directory as the data service callback
# methods (RT_basedir).
#pragma ident “@(#)gettime.c 1.1 00/05/24 SMI”
#include <stdio.h>
#include <sys/types.h>
#include <time.h>
main()
{
printf(“%d\n”, time(0));
exit(0);
}
|