// ace_time.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include <process.h>
#include<ace/log_msg.h>
#include <ace/ace.h>
#include <ace/os.h>
#include <ace/Time_value.h>
#include <ace/date_time.h>
using namespace std;
#pragma comment(lib,"aced.lib")
int _tmain(int argc, _TCHAR* argv[])
{
ACE_Time_Value sdate(ACE_OS::gettimeofday()) ;
Sleep(1000);
ACE_Time_Value edate(ACE_OS::gettimeofday()) ;
ACE_DEBUG((LM_DEBUG,"总共历时%d毫秒!",(sdate-edate).msec()));
ACE_DEBUG((LM_DEBUG,"总共历时%d微秒!",(sdate-edate).usec()));
ACE_DEBUG((LM_DEBUG,ACE_TEXT("%d\n"),ACE_OS::gettimeofday()));;
ACE_Date_Time tvTime(ACE_OS::gettimeofday());
ACE_DEBUG((LM_DEBUG,ACE_TEXT("%d年:%d月:%d日:%d时:%d分:%d秒:%d毫秒\n"),tvTime.year(),tvTime.month(),tvTime.day(),
tvTime.hour(),tvTime.minute(),tvTime.second(),tvTime.microsec()));
system("pause");
return 0;
}
ace_time
最新推荐文章于 2024-07-12 22:22:59 发布