Descargar
Desarrollar
Cuenta
Descargar
Desarrollar
Entrar
Forgot Account/Password
Crear Cuenta
Idioma
Ayuda
Idioma
Ayuda
×
Entrar
Nombre de usuario
Contraseña
×
Forgot Account/Password
Translation Status of Español
Categoría:
Software
Gente
PersonalForge
Magazine
Wiki
Buscar
OSDN
>
Buscar Software
>
System
>
Networking
>
CLX C++ Libraries
>
Foros
>
ヘルプ
>
clx::timerについて
CLX C++ Libraries
Descripción
Project Summary
Developer Dashboard
Página Web
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
Historial
Descargas
List of Releases
Stats
Código Fuente
Code Repository list
Subversion
Ver Repositorio
Incidencia
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Communication
List of Forums
ヘルプ (2)
公開討議 (19)
開発者 (24)
Noticias
Foros:
ヘルプ
(Thread #34963)
Return to Thread list
RSS
clx::timerについて (2014-01-24 16:12 by
pine
#71361)
Responder
Crear incidencia
clx::timerをWindowsで使っていて問題に直面しました。
この関数ですが内部でtimeGetTime()の戻り値をdoubleに変換しているようですが、これではWindows起動後24.9日あるいは49.7日経った時に符号が変わってしまうため、経過時間がとんでもない値になってしまいます。つまり、start時点のtimeGetTime()の戻り値が0x7FFFFFFFで、経過後の戻り値が0x80000000だったら、ということです。
内部ではDWORDのまま保持しておいて、DWORDのまま差分を取ってからdoubleに変換すべきだと思います。
Responder al #71361
×
Sujeto
Body
Reply To Message #71361 > clx::timerをWindowsで使っていて問題に直面しました。 > この関数ですが内部でtimeGetTime()の戻り値をdoubleに変換しているようですが、これではWindows起動後24.9日あるいは49.7日経った時に符号が変わってしまうため、経過時間がとんでもない値になってしまいます。つまり、start時点のtimeGetTime()の戻り値が0x7FFFFFFFで、経過後の戻り値が0x80000000だったら、ということです。 > 内部ではDWORDのまま保持しておいて、DWORDのまま差分を取ってからdoubleに変換すべきだと思います。
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Entrar
Nickname
Vista previa
Post
Cancelar