Update contrib.
     4 // gives access to the Pentium's (secret) cycle counter
 
     6 // This software was written by Leonard Janke (janke@unixg.ubc.ca)
 
     7 // in 1996-7 and is entered, by him, into the public domain.
 
     9 #if defined(__WATCOMC__)
 
    10 void GetTSC(unsigned long&);
 
    11 #pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
 
    12 #elif defined(__GNUC__)
 
    14 void GetTSC(unsigned long& tsc)
 
    16   asm volatile(".byte 15, 49\n\t"
 
    21 #elif defined(_MSC_VER)
 
    23 void GetTSC(unsigned long& tsc)
 
    35 #include <openssl/des.h>
 
    37 void main(int argc,char *argv[])
 
    39 	des_key_schedule key1,key2,key3;
 
    40 	unsigned long s1,s2,e1,e2;
 
    41 	unsigned long data[2];
 
    46 		for (i=0; i<1000; i++) /**/
 
    48 			des_encrypt3(&data[0],key1,key2,key3);
 
    50 			des_encrypt3(&data[0],key1,key2,key3);
 
    51 			des_encrypt3(&data[0],key1,key2,key3);
 
    52 			des_encrypt3(&data[0],key1,key2,key3);
 
    55 			des_encrypt3(&data[0],key1,key2,key3);
 
    56 			des_encrypt3(&data[0],key1,key2,key3);
 
    57 			des_encrypt3(&data[0],key1,key2,key3);
 
    58 			des_encrypt3(&data[0],key1,key2,key3);
 
    60 			des_encrypt3(&data[0],key1,key2,key3);
 
    63 		printf("des %d %d (%d)\n",
 
    64 			e1-s1,e2-s2,((e2-s2)-(e1-s1)));