Can I adjust the accuracy of timer?
Abierto
- Lenguaje dominante
- C++
- Estrellas
- 510
- Forks
- 123
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Failed to achieve FPS 60 ( frame per second) :
```
auto timenow() {
return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count();
}
int main() {
boost::fibers::fiber mainFiber([]()
{
while (true) {
auto now = timenow();
boost::this_fiber::sleep_for(std::chrono::milliseconds(16));
std::cout << timenow() - now << "\n";
}
});
mainFiber.join();
}
```
Outputs ( should be 16 ):
```
34
27
30
31
31
31
30
31
30
29
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.