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);
}
|