KAREN'S POWER TOOLS NEWSLETTER

~~~~~~~~~~   This Week's Power Tools Sponsor   ~~~~~~~~~~

Karen's Power Tools are now available on CD! 
To learn all about it, and securely order online, 
visit:  http://www.karenware.com/cd.asp

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

September 21, 2004

By Karen Kenworthy

Read the Web version of Power Tools online!
http://www.karenware.com/newsletters/2004/2004-09-21.asp

IN THIS ISSUE
* Marking Time
* Big Iron
* Little Iron
* All of Karen's "Power Tools"
* Subscription Center


What time is it?

It's a popular question, one many of us ask every day. Naturally, the 
answer depends on when you ask the question. But surprisingly, the answer 
also depends on who you ask.

For example, ask a rocket scientist, and you might discover the time is "T 
minus five minutes and counting". A laidback German friend might let us 
know it's "Dienstag, 21. September 2004". A precise Australian could 
respond "it's exactly 2:09:48 PM, Tuesday, 21 September 2004". 

And of course, your Mother -- who always knows the time -- might say "it's 
time for supper".


Marking Time
------------
Ask a computer, and you could receive any of those answers. But eavesdrop 
on conversations between two computers, or listen to a computer talking to 
itself, and you'll discover our binary buddies speak a special temporal 
language all their own.

To begin with, computers don't concern themselves with quaint human 
notions such as years, months, days, hours, minutes or even seconds. 
Instead, they count tiny intervals of time.

For example, the earliest IBM Personal Computers marked time by counting 
electrical pulses produced by a special circuit at the astounding rate of 
18.2 times per second (once every 55 milliseconds). The count was reset to 
zero each night at midnight. 

Newer PCs also have a timing circuit that oscillates one thousand times a 
second. This count is set to zero each time Windows starts, or after 
Windows has run continuously for a total of 4,294,967,295 milliseconds 
(approximately 49.710269618056 days).

Computers running Windows 95 or later can take advantage of a third 
circuit to measure time even more accurately. The frequency of this high-
speed oscillator varies from one computer to another. But it usually 
produces a few million pulses each second.

[Nerdy Note: You can discover the exact frequency of your computer's High 
Resolution Timer. Just run my Computer Profiler program, and click its 
"Time" tab. Look for the entry labeled "High Resolution Timer Frequency".]

Because this timer ticks so furiously, Windows allocates more space to 
store its current value. This counter can continue to increase until it's 
recorded a total of 18,446,744,073,709,551,615 ticks! This should take at 
least 21,350,398 seconds (assuming a fast 10 MHz oscillator), or a little 
over 58,454 years, before the counter reaches its limit. They tell me at 
that point the count is reset to zero and begins again. :)


Big Iron
--------
So, how do our computers manage to turn all these counts into dates and 
the time-of-day? To perform that trick, they use another circuit, called a 
Real-Time Clock (RTC), and a little simple arithmetic.

To understand the RTC, let's take a short trip back in time, to the early 
days of electronic computing. Back to the days when computers were coal-
fired colossi, sporting long rows of toggle switches and enormous banks of 
rapidly flickering lights.

Now a lot of us aren't at our best the first thing in the morning. But 
these fabulously expensive thinkers were exceptionally dull upon 
awakening. In fact, when powered up, they did exactly nothing. That's 
right -- they sat there without a single thought in their hand-wired 
chassis.


To bring these colossal calculators to consciousness, you began by tying 
one end of a long rope around the waist of a junior computer operator. The 
other end was tethered to a heavy immovable object, such as a building 
support column, or a marketing manager.

The now easily retrievable computer operator was then sent into the cave, 
err, computer room, armed with a short list of numbers, and a small deck 
of computer punch cards or a short coil of punched paper tape.

His first job was to enter those numbers into the computer's memory, using 
rows of toggle switches made just for that purpose. Each toggle switch 
represented one bit in the computer's memory. Place the switch in one 
position, and the corresponding bit became a 1. Place the switch in its 
other position, and the bit magically changed to a 0.

The numbers entered by the operator were computer instructions, codes that 
ordered the computer to read a single punched card (or read a short length 
of punched paper tape). That card (or section of tape) contained 
instructions that ordered the computer to read even more cards (or more 
tape). This process continued until the operator's supply of cards (or 
tape) was completely read into the computer's memory.

Now the fun began. The small program now stored in the computer's memory, 
called a "loader", could read the computer's disk drives. And that's 
exactly what it did, copying the computer's operating system from a nearby 
disk into the computer's memory. 

Once the operating system took control, it asked the operator a familiar 
question: What time is it? The operator checked a nearby desk calendar, 
and entered the current date. Next, after a quick glance at the hands of 
an old-fashioned clock mounted on the computer room wall, entered the time 
of day.

>From then on, until it once again entered a powered down slumber, the 
computer knew the current date and time. It simply added the elapsed time, 
measured by the counters we discussed earlier, to the initial date and 
time entered by the computer operator. 

Did the operator say it was 8 a.m.? Have two hours past since then? The 
current time must be 10 a.m.!

[Nerdy Note: The numbers, cards or tape were called the "bootstrap" 
because they allowed the computer to metaphorically "pull itself up by its 
own bootstraps", or load its own operating system. To this day, the steps 
required to initialize a computer after powering up are called the "boot 
process".]


Little Iron
-----------
Finally, the ancient computer is fully awake, ready to take its proper 
place in electronic society, able to juggle data, print reports, and much 
more!

Today, most of the work of junior computer operators is performed by the 
computer itself. A short computer program, permanently stored in a special 
"Boot ROM (Read-Only Memory)" circuit, contains instructions that control 
a newly awakened computer. This little program reads a special "boot 
sector" from the computer's hard disk, and copies the sector's data to the 
computer's memory. 

The instructions stored in the boot sector compel the computer to load 
more data from the disk, eventually leading to the loading of Windows, or 
another computer operating system.


What happens next? It depends on the age of your PC. The oldest personal 
computers behaved just like their mainframe ancestors, asking a human 
operator for the current date and time. 

But early in the evolution of small computers, these baby brains acquired 
a Real Time Clock (RTC) circuit. This gadget is a close cousin of the 
simple alarm clock that probably sits on the nightstand beside your bed. 
It lacks the colorful LED display, and doesn't have a snooze button. But, 
once set, it does keep track of the current time of day. As a bonus, it 
also knows the current date.

Now, instead of asking a human operator "What time is it?", that question 
is directed to the RTC. The question is asked only once. As before, the 
current time is computed by simple arithmetic. The time that has elapsed 
since that question was asked and answered is simply added to the initial 
date and time. The result is "now", the current date and time.


Now you may be wondering, why do computers with an RTC bother keeping 
their own counts of times past? Why not completely rely on the RTC, 
whenever the computer needs to know the current date and time?

There are two reasons. First, our computer's RTC circuits speak very 
slowly. Each digit of the date and time must be requested and retrieved 
separately. And each response can take several milliseconds to arrive -- 
an eternity in the high-speed world of computers.
 
Second, the Real Time Clocks found in most personal computers are 
notoriously inaccurate. Many gain or lose several seconds per day. What's 
worse, their inaccuracy is not consistent. The chip's precision depends on 
the temperature inside the computer's case, the age of the circuit, and 
the health of the battery that powers the RTC when the computer is powered 
down.


OK, now you may be wondering, why do most computers rely on their RTC at 
all? Probably, it's force of habit. It's easy for the writers of operating 
systems, such as Windows, to depend on a circuit that's always present, 
despite its drawbacks.

But there is an alternative. Today, more and more computers periodically 
synchronize their sense of time with an ultra-precise atomic clock. All 
they need is an Internet connection, and a program like my new Time Sync. 


Ironically, we're out of time. :)

But before we get together again, you can give Karen's Time Sync a try. 
Just visit the program's home page at:

    http://www.karenware.com/powertools/ptsync.asp

To download a copy of Karen's Computer Profiler, drop by its home page at:

    http://www.karenware.com/powertools/ptprofiler.asp


As always, both programs are free for personal/home use. If you're a 
programmer, you can download their Visual Basic source code too! 

Better yet, get the latest version of every Power Tool, including Time 
Sync and Computer Profiler, on a brand-new, shiny CD. You'll also get 
three bonus Power Tools, not available anywhere else. Source code of every 
Power Tool, the text of every issue of my newsletter, and some of my 
articles written for Windows Magazine, are also included. And owning the 
CD grants you a special license to use all my Power Tools at work. 

Best of all, buying a CD is the easiest way to support the KarenWare.com 
web site, Karen's Power Tools, and this newsletter! To find out more, 
visit:

    http://www.karenware.com/cd.asp


Until we meet again, if you need to know the time, just ask. And if you 
see me on the 'net, be sure to wave and say "Hi!" 

Karen


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Visit Karen's Power Tools Store and check out her collection 
of Power Tools T-shirts, mouse pads, hats, tote bags, mugs, 
and more! A portion of each purchase helps keep Karen's 
Power Tools newsletter and programs free!  

http://www.karenware.com/store.asp

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


All of Karen's Power Tools 
--------------------------
  Note: For the most up-to-date list, visit: 
  http://www.karenware.com/powertools.asp

* Time Sync - http://www.karenware.com/powertools/ptsync.asp
  Zone Manager - http://www.karenware.com/powertools/ptzone.asp
  Directory Printer - http://www.karenware.com/powertools/ptdirprn.asp
  Print Logger - http://www.karenware.com/powertools/ptprnlog.asp
  LAN Monitor - http://www.karenware.com/powertools/ptlanmon.asp
  URL Discombobulator - http://www.karenware.com/powertools/ptlookup.asp
  Window Watcher - http://www.karenware.com/powertools/ptwinwatch.asp
  'Net Monitor - http://www.karenware.com/powertools/ptnetmon.asp
  Drive Info - http://www.karenware.com/powertools/ptdinfo.asp
  E-Mailer II - http://www.karenware.com/powertools/ptmailer2.asp
  Countdown Timer II - http://www.karenware.com/powertools/ptcount2.asp
  Computer Profiler - http://www.karenware.com/powertools/ptprofiler.asp
  Replicator - http://www.karenware.com/powertools/ptreplicator.asp
  Disk Slack Checker - http://www.karenware.com/powertools/ptslack.asp
  WhoIs - http://www.karenware.com/powertools/ptwhois.asp
  Recycler - http://www.karenware.com/powertools/ptrecycler.asp
  Show Stopper - http://www.karenware.com/powertools/ptstopper.asp
  Alarm Clock - http://www.karenware.com/powertools/ptalarm.asp
  Font Explorer - http://www.karenware.com/powertools/ptfonts.asp
  Power Toy - http://www.karenware.com/powertools/pttoy.asp
  Time Cop - http://www.karenware.com/powertools/pttimecop.asp
  Hasher - http://www.karenware.com/powertools/pthasher.asp
  Mailer - http://www.karenware.com/powertools/ptmailer.asp
  Version Browser - http://www.karenware.com/powertools/ptbrowse.asp
  Autorun.inf Editor - http://www.karenware.com/powertools/ptautorun.asp
  Cookie Viewer - http://www.karenware.com/powertools/ptcookie.asp
  Registry Pruner - http://www.karenware.com/powertools/ptpruner.asp
  Registry Ripper - http://www.karenware.com/powertools/ptregrip.asp
  Snooper - http://www.karenware.com/powertools/ptsnoop.asp
  Clipboard Viewer - http://www.karenware.com/powertools/ptclpvue.asp

* Indicates program was updated recently.

NOTE: You should use Control Panel's "Add/Remove Programs" applet to 
remove the old version, before installing a new version of a Power Tool.

Note: Be sure to install the Visual Basic Runtime v6.0 before installing 
your first Power Tool. It's required by all the Power Tools, and must be 
installed first. You can download a copy of the Visual Basic Runtime v6.0 
installer, vbrun60-setup.exe, from any of the pages where you download the 
Power Tools themselves, or from my special Runtimes page at: 
http://www.karenware.com/runtimes.asp 


-- K-A-R-E-N-'-S--P-O-W-E-R-T-O-O-L-S --------------------
Copyright 2004 Karen Kenworthy
http://www.karenware.com/


Subscription Center
-------------------
To subscribe to this newsletter, visit http://www.karenware.com/subscribe/ 
or send a message from the email account where you'd like to receive the 
newsletter to: [EMAIL PROTECTED]

To change or cancel your subscription, click this custom link to Karen's 
Power Tools Newsletter Subscription Center:

https://secure.karenware.com/sc.asp?key=nela&id=98780

You can also cancel your subscription by sending a message, from the email 
account where you are subscribed, to: [EMAIL PROTECTED]

This Newsletter was Sent to: [EMAIL PROTECTED]
Your Subscriber ID is: 98780


Reply via email to