span class=postbodyGetTickCount 함수는 어떤 상대적 시간의 간격을 측정할때 매우 유용하게 사용됩니다.
br /
대부분 40일정도 이상의 간격을 측정할일이 없어서 유용한 함수이지만
br /
40여일보다 큰 시간 간격을 측정하기에는 제약이 존재합니다.
br /
br /
그래서 그보다 훨씬 큰 시간간격을 측정하기 위해서 다음과 같이 만들면 유용하겠지요.
br /
br /
/spantable align=center border=0 cellpadding=3 cellspacing=1 width=90%tbodytr tdspan class=genmedb코드:/b/span/td /tr tr td class=code
br /
typedef LONGLONG __mzapi_qword_t;
br /
#define mzapi_qword_t __mzapi_qword_t
br /
br /
mzapi_qword_t mzapi_get_time_stamp(void)
br /
{
br /
nbsp; nbsp; LARGE_INTEGER s_performance_frequency;
br /
nbsp; nbsp; LARGE_INTEGER s_performance_count;
br /
nbsp; nbsp;
br /
nbsp; nbsp; if((QueryPerformanceFrequency((LARGE_INTEGER *)(amp;s_performance_frequency)) == TRUE) amp;amp;
br /
nbsp; nbsp; nbsp; nbsp;(QueryPerformanceCounter((LARGE_INTEGER *)(amp;s_performance_count)) == TRUE)) {
br /
nbsp; nbsp; nbsp; nbsp; if(s_performance_frequency.QuadPart != ((LONGLONG)0)) {
br /
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; return((((mzapi_qword_t)s_performance_count.QuadPart) *
((mzapi_qword_t)1000)) /
((mzapi_qword_t)s_performance_frequency.QuadPart));
br /
nbsp; nbsp; nbsp; nbsp; }
br /
nbsp; nbsp; }
br /
nbsp; nbsp;
br /
nbsp; nbsp; return((mzapi_qword_t)GetTickCount());
br /
}
br /
/td /tr/tbody/tablespan class=postbodybr //span
받은 트랙백이 없고,
댓글이 없습니다.

글
댓글을 달아 주세요
댓글 RSS 주소 : http://blog.minzkn.com/rss/comment/210댓글 ATOM 주소 : http://blog.minzkn.com/atom/comment/210