Mercurial > hg > octave-terminal
changeset 7145:d169c9f4a697
[project @ 2007-11-09 17:43:06 by jwe]
author | jwe |
---|---|
date | Fri, 09 Nov 2007 17:43:07 +0000 |
parents | 30c0533e39ae |
children | c7e5e638a8d0 |
files | src/ChangeLog src/data.cc |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2007-11-09 David Bateman <dbateman@free.fr> + * data.cc (Fcputime) [__WIN32__]: Correct scaling of sys and usr times. + * graphics.cc (is_handle): Handle must be a real scalar. 2007-11-09 Joseph P. Skudlarek <Jskud@Jskud.com>
--- a/src/data.cc +++ b/src/data.cc @@ -3271,15 +3271,16 @@ static_cast<double>(HZ); #elif defined (__WIN32__) + HANDLE hProcess = GetCurrentProcess (); FILETIME ftCreation, ftExit, ftUser, ftKernel; GetProcessTimes (hProcess, &ftCreation, &ftExit, &ftKernel, &ftUser); int64_t itmp = *(reinterpret_cast<int64_t *> (&ftUser)); - usr = static_cast<double> (itmp) * 1e-1; + usr = static_cast<double> (itmp) * 1e-7; itmp = *(reinterpret_cast<int64_t *> (&ftKernel)); - sys = static_cast<double> (itmp) * 1e-1; + sys = static_cast<double> (itmp) * 1e-7; #endif