00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
#ifndef PI_BasicTypes_h
00014 
#include "PI_Basic.h"
00015 
#endif
00016 
00017 
#ifndef PI_Machine_h
00018 
#include "PI_Mach.h"
00019 
#endif
00020 
00021 
#ifndef PI_Memory_h
00022 
#include "PI_Mem.h"
00023 
#endif
00024 
00025 
#include <time.h>
00026 
#if __IS_MSDOS
00027 
#include <wtypes.h>
00028 
#endif
00029 
00030 
double MyTickCount(
void);
00031 
double MyTickCount(
void)
00032 {
00033         
double timevalue;
00034 
#if __IS_MAC
00035 
        timevalue = 
TickCount()/60.;
00036 
#elif __IS_MSDOS
00037 
        timevalue = GetTickCount()/1000.;
00038 
#else
00039 
        timevalue = clock()/(CLOCKS_PER_SEC*1000.);
00040 
#endif
00041 
        return timevalue;
00042 }
00043 
00044 
#if __IS_MSDOS
00045 
UINT32 TickCount(
void)
00046 {
00047         
UINT32 timevalue;
00048         timevalue = (
UINT32)(GetTickCount()/1000.*60 + .5 );
00049         
return timevalue;
00050 }
00051 
#endif
00052 
00053 
#if !__IS_MSDOS
00054 
#if !__IS_MAC
00055 UINT32 TickCount(
void)
00056 {
00057         
UINT32 timevalue;
00058         timevalue = (
UINT32) time(
NULL);
00059         
return timevalue;
00060 }
00061 
#endif
00062 
#endif