Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.os.windows-10 > #35418

Re: How Do You Show Seconds on the Clock?

From micky <NONONOmisc07@bigfoot.com>
Newsgroups alt.comp.os.windows-10
Subject Re: How Do You Show Seconds on the Clock?
Date 2017-02-20 04:32 -0500
Organization A noiseless patient Spider
Message-ID <esdlacpgut71eipdruc5ghovdlq7dg15gi@4ax.com> (permalink)
References (1 earlier) <db31e7b1-26fa-f6ce-6d84-b3f63d23559c@aol.com> <J_-dnUp5S-GTMwPFnZ2dnUU7-WednZ2d@earthlink.com> <o7ncia$i7u$1@dont-email.me> <m4q3ac9j0bn1dm374g8ell5ir9juhfgg4f@4ax.com> <o7u535$2ha$1@dont-email.me>

Show all headers | View raw


In alt.comp.os.windows-10, on Tue, 14 Feb 2017 00:39:32 -0500, Paul
<nospam@needed.invalid> wrote:

>micky wrote:
>> In alt.comp.os.windows-10, on Sat, 11 Feb 2017 11:04:07 -0500, Paul
>> <nospam@needed.invalid> wrote:
>> 
>>> Ant wrote:
>>>> Pfsszxt <Pfsszxt@aol.com> wrote:
>>>>> On 2/10/2017 8:33 AM, Ricardo Jimenez wrote:
>>>>>> Unlike Windows 7, the clock in the lower right hand corner doesn't
>>>>>> show seconds in Windows 10.  Is there an adjustment or some freeware
>>>>>> available to do that?  The first app I downloaded and tried from CNET
>>>>>> didn't work with Windows 10.
>>>>>>
>>>>>   Just think! How many folks need, or want, the current time to the 
>>>>> exact second ?
>>>> I want (nano/mili)seconds too. :P
>>> Computers make lousy timepieces.
>>>
>>> Computers actually have multiple time pieces, and they
>>> need to be synchronized. This places a lower limit,
>>> on how good a computer timepiece can be.
>>>
>>> The best articles on time, can be found on the web
>>> sites of companies that write virtual machine hosting
>>> software. As they have to know how the stuff really works.
>>>
>>>    Paul
>> 
>> It took me 26.453635443566545466 seconds to read this.
>
>Your resolution can only be 3.3ns or so :-) The
>resolution cannot be higher than the inverse of the
>CPU core clock. Many time pieces in the machine will

I wasn't using the computer clock.  I was using my internal clock. 

>run slower than that. Even RDTSC might only run
>at one quarter of the core clock rate. We may have to
>snip some of your digits.
>
>    26.453635443 +/- 0.000000003  (maybe)
>
>I have a short program, that needed a timestamp. This
>is the code for using one of the counters in the CPU.
>
>     __int64 time1 = 0, time2 = 0, freq = 0;
>     QueryPerformanceCounter((LARGE_INTEGER *) &time1);
>     QueryPerformanceFrequency((LARGE_INTEGER *)&freq);
>
>     time passes...
>
>     QueryPerformanceCounter((LARGE_INTEGER *) &time2);
>     printf("t=%010.6f\n", i, (float)(time2-time1)/freq);
>
>The PerformanceFrequency should be related to the core
>clock somehow. Maybe core clock divided by 4 or so. That's
>the highest precision "relative-time" mechanism I know
>of. However, to convert that to clock time is problematic,
>as you would need to read the system clock and add an
>offset. And that's what the web page on a virtual machine
>hosting site can help you with. Understanding how
>all the "time-islands" are tied together.
>
>http://stackoverflow.com/questions/11354905/what-is-the-resolution-of-windows-high-performance-counter
>
>"Acquiring high-resolution time stamps"
>
>https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408%28v=vs.85%29.aspx
>
>    coreinfo.exe
>
>    RDTSCP          * Supports RDTSCP instruction
>    TSC             * Supports RDTSC instruction
>    TSC-DEADLINE    - Local APIC supports one-shot deadline timer
>    TSC-INVARIANT   * TSC runs at constant rate
>
>The latter one is important, because there was *something*
>on a multicore CPU, where as the program moves from
>core to core, the timestamp accuracy is degraded. Each
>core had its own counter. The INVARIANT property suggest
>the CPU architecture was corrected for the deficiency,
>so the OS didn't have to fiddle with it all the time.
>
>Using QueryPerformanceCounter is meant to hide the details
>and fool the programmer into thinking the "time-islands" underneath
>aren't complicated.
>
>See the fun you're missing ?
>
>      Paul

Back to alt.comp.os.windows-10 | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How Do You Show Seconds on the Clock? Ricardo Jimenez <rickyjim@earthlink.net> - 2017-02-10 09:33 -0500
  Re: How Do You Show Seconds on the Clock? Pfsszxt <Pfsszxt@aol.com> - 2017-02-10 09:10 -0600
    Re: How Do You Show Seconds on the Clock? Eric Allen <ericgreenarrow@aol.com> - 2017-02-10 08:27 -0700
    Re: How Do You Show Seconds on the Clock? Paul <nospam@needed.invalid> - 2017-02-10 13:58 -0500
    Re: How Do You Show Seconds on the Clock? Mark Lloyd <not@mail.invalid> - 2017-02-10 13:07 -0600
    Re: How Do You Show Seconds on the Clock? ANTant@zimage.com (Ant) - 2017-02-11 00:24 -0600
      Re: How Do You Show Seconds on the Clock? Paul <nospam@needed.invalid> - 2017-02-11 11:04 -0500
        Re: How Do You Show Seconds on the Clock? micky <NONONOmisc07@bigfoot.com> - 2017-02-13 12:11 -0500
          Re: How Do You Show Seconds on the Clock? Paul <nospam@needed.invalid> - 2017-02-14 00:39 -0500
            Re: How Do You Show Seconds on the Clock? micky <NONONOmisc07@bigfoot.com> - 2017-02-20 04:32 -0500
  Re: How Do You Show Seconds on the Clock? Gordon <gordonlr@swbell.net> - 2017-02-10 09:30 -0600
    Re: How Do You Show Seconds on the Clock? Ricardo Jimenez <rickyjim@earthlink.net> - 2017-02-10 11:10 -0500
  Re: How Do You Show Seconds on the Clock? Yeff <zoomie@fastmail.fm> - 2017-02-10 10:47 -0500
    Re: How Do You Show Seconds on the Clock? Gene Wirchenko <genew@telus.net> - 2017-02-10 10:02 -0800
      Re: How Do You Show Seconds on the Clock? B00ze <B00ze64@hotmail.com> - 2017-02-10 23:04 -0500
  Re: How Do You Show Seconds on the Clock? "Jonathan N. Little" <lws4art@gmail.com> - 2017-02-10 11:11 -0500
    Re: How Do You Show Seconds on the Clock? Eric Allen <ericgreenarrow@aol.com> - 2017-02-10 09:35 -0700
      Re: How Do You Show Seconds on the Clock? Rene Lamontagne <rlamont@shaw.ca> - 2017-02-10 11:27 -0600
      Re: How Do You Show Seconds on the Clock? "Jonathan N. Little" <lws4art@gmail.com> - 2017-02-10 12:39 -0500
        Re: How Do You Show Seconds on the Clock? Eric Allen <ericgreenarrow@aol.com> - 2017-02-10 11:38 -0700
        Re: How Do You Show Seconds on the Clock? Big Al <BigAl@invalid.com> - 2017-02-10 15:28 -0500
          Re: How Do You Show Seconds on the Clock? "Jonathan N. Little" <lws4art@gmail.com> - 2017-02-10 22:56 -0500
  Re: How Do You Show Seconds on the Clock? Keith Nuttle <Keith_Nuttle@sbcglobal.net> - 2017-02-10 12:34 -0500
    Re: How Do You Show Seconds on the Clock? Sergey <invalid@127.0.0.1.invalid> - 2017-02-10 13:54 -0500
      Re: How Do You Show Seconds on the Clock? Keith Nuttle <Keith_Nuttle@sbcglobal.net> - 2017-02-10 15:44 -0500

csiph-web