version 3.1.4

This commit is contained in:
Alchemy
2011-02-24 14:23:31 +01:00
parent 339d23c06d
commit b12242f3f4
446 changed files with 135919 additions and 5 deletions

View File

@@ -0,0 +1,42 @@
#include "base_header.h"
#include "phrasea_clock_t.h"
#ifndef COMPILE_DL_PHRASEA2
#error COMPILE_DL_PHRASEA2 is false
#endif
# ifdef PHP_WIN32
void startChrono(CHRONO &chrono)
{
chrono = GetTickCount();
}
double stopChrono(CHRONO &chrono)
{
return((double)(GetTickCount()-chrono) / 1000.0);
}
# else
void startChrono(CHRONO &chrono)
{
gettimeofday(&chrono, NULL);
return;
}
double stopChrono(CHRONO &chrono)
{
struct timeval t;
gettimeofday(&t, NULL);
t.tv_sec -= chrono.tv_sec;
t.tv_usec -= chrono.tv_usec;
if(t.tv_usec < 0)
{
t.tv_sec--;
t.tv_usec += 1000000;
}
return((double)(t.tv_sec) + ((double)(t.tv_usec))/1000000);
}
#endif