MoniWiki¸Þ¸ðÀå_C_Time
Login:
Password:
´ë¹®|ã±â|¹Ù²ï±Û|¸ñ·Ï|¸Þ¸ðÀå|Ã¥°¥ÇÇ|¿¬²É|¸µÅ©
Edit Diff Reload Search Print Info Mail Help RSS


@ 2012-06-16 @
  C++_½Ã°£ °ü·Ã ÇÔ¼ö ¸ðÀ½
1 timeGetTime();
2 Win32API/ GetLocalTime(...);
{_r} ¸Þ¸ðÀåÀ¸·Î °¡±â
(f_ln) ¸Þ¸ðÀå_C·Î °¡±â

1 timeGetTime(); #

* ½Ã°£´Ù·ç±â ; http://www.gpgstudy.com/gpgiki/%BD%C3%B0%A3%20%B4%D9%B7%E7%B1%E2#heading15
timeGetTime()
#pragma comment(lib, "winmm.lib")
#include <mmsystem.h>
GetTickCount()
#include <Windows.h>
QueryPerformanceFrequency()
QueryPerformanceCounter()- ¸î¸î CPU¿¡¼± Ŭ·°ÀÌ °Ç³Ê¶Ú´Ù´Â º¸°í°¡ ÀÖÀ½...
{_-} CPU Ŭ·°¿¡ »ó°üÀÌ ¾ø´Â timeGetTime()ÇÔ¼ö¸¦ »ç¿ë

2 Win32API/ GetLocalTime(...); #

@ 2012-06-15 @
¢¹ Á¤ÀÇ
¿øÇü VOID GetLocalTime( LPSYSTEMTIME lpSystemTime );
MFC ¿øÇü struct tm * CTime::GetLocalTime( struct tm * ptm = NULL ) const;
GetLocalTime( ... ); ·ÎÄà ½Ã°£À» ±¸ÇÑ´Ù.
SetLocalTime( ... ); ·ÎÄà ½Ã°£À» º¯°æÇÑ´Ù.
·ÎÄà ½Ã°£À̶õ ½Ã½ºÅÛÀÌ À¯ÁöÇÏ´Â ½Ã½ºÅÛ ½Ã°£(UTC : Universal Time Coordinated)¿¡¼­ ÇöÀç ÄÄÇ»ÅÍ°¡ ½ÇÇàµÇ°í ÀÖ´Â ½Ã°£´ë¿Í Àϱ¤ Àý¾à ½Ã°£À» °è»êÇÏ¿© º¯È¯ÇÑ ½Ã°£ÀÌ´Ù. ´ëÇѹα¹ÀÇ ·ÎÄà ½Ã°£Àº UTC ½Ã°£º¸´Ù 9½Ã°£ ´õ ºü¸£¹Ç·Î ½Ã½ºÅÛ ½Ã°£¿¡¼­ 9½Ã°£¸¸Å­ ´õÇØ ÁÖ¾î¾ß ·ÎÄà ½Ã°£ÀÌ ±¸ÇØÁø´Ù. ÀϹÝÀûÀ¸·Î ÇöÁö ½Ã°£À̶ó°í Çϸé ÀÌ ÇÔ¼ö·Î ±¸ÇØÁö´Â ·ÎÄà ½Ã°£À» ÀǹÌÇÑ´Ù.
GetSystemTime( ... ); ½Ã½ºÅÛ ½Ã°£À» ±¸ÇÑ´Ù.
SetSystemTime( ... ); ½Ã½ºÅÛ ½Ã°£À» º¯°æÇÑ´Ù.
½Ã½ºÅÛ ½Ã°£(UTC)Àº ¼¼°è Ç¥ÁؽÃÀÌ¸ç °æµµ 0µµÀÎ ¿µ±¹ÀÇ ±×¸®´ÏÄ¡ õ¹®´ë¸¦ ±âÁØÀ¸·Î ÇÑ ½Ã°£ÀÌ´Ù. ¿ì¸®³ª¶ó ½Ã°£º¸´Ù 9½Ã°£ ´À¸®´Ù. ÀÌ ½Ã°£Àº ÇöÁö ½Ã°£ÀÌ ¾Æ´Ï¹Ç·Î ÇöÀçÀÇ ½Ã°£°ú ³¯Â¥¸¦ ¾Ë°í ½ÍÀ» ¶§´Â GetLocalTime ÇÔ¼ö¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù. ´Ù±¹¾î ¹öÀüÀ» ¸¸µéÁö ¾Ê´Â ÇÑ ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÒ ÀÏÀ» º°·Î ¾ø´Ù.
Ç÷§Æû 95 ÀÌ»ó

¢¹ Çìµå ÆÄÀÏ Á¤ÀÇ
// C:\... \ microsoft visual studio 8\ vc\ platformsdk\ include\ winbase.h
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;

WINBASEAPI
VOID
WINAPI
GetSystemTime(
__out LPSYSTEMTIME lpSystemTime
);

WINBASEAPI
VOID
WINAPI
SetSystemTime(
__in CONST SYSTEMTIME *lpSystemTime
);

WINBASEAPI
VOID
WINAPI
GetLocalTime(
__out LPSYSTEMTIME lpSystemTime
);

WINBASEAPI
VOID
WINAPI
SetLocalTime(
__in CONST SYSTEMTIME *lpSystemTime
);

¢¹ »ç¿ë
SYSTEMTIME sysTime;
GetLocalTime( &sysTime );



November, 2024
 12
3456789
10111213141516
17181920212223
24252627282930

Â÷°¡¿î Â÷¿Í Â÷°¡¿î ¹äÀº ÂüÀ» ¼ö ÀÖÁö¸¸ Â÷°¡¿î À̾߱â´Â °ßµðÁö ¸øÇÑ´Ù(Áß±¹¼Ó´ã)

Ã¥°¥ÇÇ_The_Intelligent_Investor
TitleIndex
CategoryHomepage
Ã¥°¥ÇÇ_ManAndHisSymbols
last modified 2012-06-15 15:47:11
°íÄ¡±â|ã±â|ÂÊ Áö¿ì±â|ºñ½ÁÇÑ ÂÊ Valid XHTML 1.0! Valid CSS! powerd by MoniWiki
0.0208 sec