看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) Borland c++ 6 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 假設有五個區段時間,(7:00~9:00,9:00~11:00,11:00~13:00,13:00~15:00,15:17:00) 當現在時間是在某個區段內的話,則在那個區段執行撈取資料的動作. ex: 若 Time()已經超過9:00,則停止在7:00~9:00進行撈資料動作. 請問該如何設計呢? 餵入的資料(Input): 使用到Timer元件 預期的正確結果(Expected Output): 錯誤結果(Wrong Output): 程式碼(Code):(請善用置底文網頁, 記得排版) 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.221.83.204
ericinttu:Timer? Time? Date? 09/16 16:47
PROTEL:抓系統時間後用 switch ~case 執行你要的動作 09/16 23:01
xxtuoo:還不如開個thread 定時polling時間 決定動作算了 09/17 00:20