// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <stdlib.h>

#include <iostream>

using namespace std;

#include <conio.h>

#include <windows.h>

int main(int argc, char *argv[])
{
  int a[100];
  int t1 = GetTickCount();
  int n = 0;
  cout << "Press some random keys" << endl;
  while(n<100) {
      getch();
      int t2 = GetTickCount();
      a[n] = t2 - t1;
      t1 = t2;
      n++;
  }
  for(int i = 0; i < 100; i++) {
     cout << a[i] << endl;
  }
  return 0;
}
