int main() { char *str = "abcabcabc"; int cycle = GetMinPeriod(str); printf("%s周期为%d", str, cycle); return 0; }
bool nglTimer::SetPeriod(nglTime Period) { if (mRunning) return false; mPeriod = Period; mRoundsPerTick = ToBelow(mPeriod / GetMinPeriod()); if (!mRoundsPerTick) mRoundsPerTick = 1; return true; }