Thread: Time Stamp Counter

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    94

    Unhappy Time Stamp Counter

    Hi all!

    I would be very happy if someone can write a simple code and explain it a bit where I can see the simple implementation of the Time Stamp Counter.

    You may also use this link (Pentium Time Stamp Counter) to quickly gain a solution but please keep in mind that I dont understand the code and dont know how to use it (because of this I need your help).

    All the explanations are welcomed!

    Thanks!

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    18
    What do you want to do? Do you only require a unique id, do you require the current time to be part of it, if so, are the timestamps unique, how exact has the time to be, will it have to be consistent across a network, ...?

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    94
    I would like to implement it in simple for loop such as this one:

    int s, m;

    for(int i=0; i<m; i++)
    s=s*i;

    and I would like to play with m and see how the Time Stamp Counter behaves if m has different values such as 10, 1000, 1 000 000 etc.

    Thanks for asking!

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Yeah, you asked already!
    Time Stamp Counter again / Please Answer
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 11-01-2009, 09:54 AM
  2. Help fixing a compile time error
    By matt_570 in forum C Programming
    Replies: 2
    Last Post: 09-05-2009, 09:36 PM
  3. Journey time prog 1 minute wrong
    By mike_g in forum C Programming
    Replies: 4
    Last Post: 10-12-2006, 03:41 AM
  4. The new FAQ
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 08-30-2006, 10:05 AM
  5. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM