Mercurial > mplayer.hg
comparison cpudetect.c @ 10955:6d1388df591b
more exact cpu mhz detect for fats cpus (remove rounding)
author | atmos4 |
---|---|
date | Sun, 28 Sep 2003 01:45:54 +0000 |
parents | 685c416f12b5 |
children | 909093c314e9 |
comparison
equal
deleted
inserted
replaced
10954:27da030f7201 | 10955:6d1388df591b |
---|---|
255 if (gCpuCaps.hasTSC && (i = GetCpuSpeed()) > 0) { | 255 if (gCpuCaps.hasTSC && (i = GetCpuSpeed()) > 0) { |
256 if (i < 1000000) { | 256 if (i < 1000000) { |
257 i += 50; /* for rounding */ | 257 i += 50; /* for rounding */ |
258 snprintf(cpuspeed,15, " %d.%d MHz", i/1000, (i/100)%10); | 258 snprintf(cpuspeed,15, " %d.%d MHz", i/1000, (i/100)%10); |
259 } else { | 259 } else { |
260 i += 500; /* for rounding */ | 260 //i += 500; /* for rounding */ |
261 snprintf(cpuspeed,15, " %d MHz", i/1000); | 261 snprintf(cpuspeed,15, " %d MHz", i/1000); |
262 } | 262 } |
263 } else { /* No TSC Support */ | 263 } else { /* No TSC Support */ |
264 cpuspeed[0]='\0'; | 264 cpuspeed[0]='\0'; |
265 } | 265 } |