|
|
@ -17,7 +17,7 @@
|
|
|
|
* 02110-1301, USA.
|
|
|
|
* 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <sys/timeb.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <ZLTime.h>
|
|
|
|
#include <ZLTime.h>
|
|
|
@ -25,9 +25,9 @@
|
|
|
|
#include "ZLUnixTime.h"
|
|
|
|
#include "ZLUnixTime.h"
|
|
|
|
|
|
|
|
|
|
|
|
ZLTime ZLUnixTimeManager::currentTime() const {
|
|
|
|
ZLTime ZLUnixTimeManager::currentTime() const {
|
|
|
|
struct timeb timeB;
|
|
|
|
struct timeval timeB;
|
|
|
|
ftime(&timeB);
|
|
|
|
gettimeofday(&timeB,NULL);
|
|
|
|
return ZLTime((long)timeB.time, timeB.millitm);
|
|
|
|
return ZLTime((long)timeB.tv_sec, timeB.tv_usec/1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
short ZLUnixTimeManager::hoursBySeconds(long seconds) const {
|
|
|
|
short ZLUnixTimeManager::hoursBySeconds(long seconds) const {
|
|
|
|