Changeset 162
- Timestamp:
- Jan 22, 2009, 9:30:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/lib/os2ea.c
r160 r162 114 114 */ 115 115 116 /* The high resolution timer API provides access to the hardware timer117 * running at around 1.1MHz. The amount this changes in a time slice is118 * varies randomly due to system events, hardware interrupts etc119 */120 121 116 void os2_randget(char * buffer, int length) 122 117 { … … 128 123 129 124 } 130 131 static UCHAR randbyte_hrtimer()132 {133 QWORD t1, t2;134 UCHAR byte;135 136 DosTmrQueryTime(&t1);137 DosSleep(5);138 DosTmrQueryTime(&t2);139 140 byte = (t2.ulLo - t1.ulLo) & 0xFF;141 byte ^= (t2.ulLo - t1.ulLo) >> 8;142 return byte;143 }144 145 146 125 147 126 /* A bunch of system information like memory & process stats. … … 229 208 UCHAR randbyte() 230 209 { 231 return randbyte_ hrtimer() ^ randbyte_sysinfo() ^ randbyte_perf();210 return randbyte_sysinfo() ^ randbyte_perf(); 232 211 } 233 212
Note:
See TracChangeset
for help on using the changeset viewer.