GetTickCount function
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено Mk-51 05 ноября 2005 г. 00:12
В ответ на: Не, ну это слишком сложно. Сделал Beep(32767,500). Не слышно и просто. отправлено Сергей Борщ 05 ноября 2005 г. 00:04

The GetTickCount function retrieves the number of milliseconds that have elapsed since Windows was started.

DWORD GetTickCount(VOID)


Parameters

This function has no parameters.

Return Value

If the function succeeds, the return value is the number of milliseconds that have elapsed since Windows was started.

Remarks

The GetTickCount function is identical to the GetCurrentTime function. Applications should use the GetTickCount function because its name matches more closely what the function does.
The GetTickCount and GetMessageTime functions return different times. GetMessageTime returns the Windows time when the given message was created, not the current Windows time.
The internal timer wraps around to zero if Windows is run continuously for approximately 49.7 days.

В двух словах - эта функция возвращает число 55 мс тиков таймера, т.е. прочитав текущее состояние, циклимся на приращение его на 10 и это и будет задержка на ~ 500 мс.

Составить ответ  |||  Конференция  |||  Архив

Ответы



Rambler's Top100 Рейтинг@Mail.ru
Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание

E-mail: info@telesys.ru