if ( gs_UIState.kbdItem == id && (clock() >> 8) & 1)
{
//MovePen(x+indent+TextStringWidth(textbuf), textPosY);
DrawTextString("_");
}
這個應該是文本被編輯之后出現游標閃爍,可是這個標紅的是個啥意思呀?
uj5u.com熱心網友回復:
clock()的回傳值右移8位,然后最低位是不是1。這個回傳值的第二個8位可能比較特殊;應該是多長時間會為1吧uj5u.com熱心網友回復:
The clock() function returns an approximation of processor time used by the program.The value returned is the CPU time used so far as a clock_t; to get the number of seconds used, divide by CLOCKS_PER_SEC. If the processor time used is not available or its value cannot be represented, the function returns the value (clock_t) -1.
還有很多注意事項,建議搜索一下 clock 函式,你貼的這段函式應該是在回圈代碼塊里邊兒吧?輪循 clock 獲取時間,滿足條件就顯示 _
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/283855.html
標籤:C語言
上一篇:【新手求助】二進制轉十進制
