randsleep.c (338450436d9d691a18fb94373c58e91aa3fcb374) | randsleep.c (c27ac74f9cfea08a96087135183ad70a372f735d) |
---|---|
1/* 2 * Copyright (c) 2014 Spectra Logic Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32 * $FreeBSD$ 33 */ 34 35#include <errno.h> 36#include <stdio.h> 37#include <stdlib.h> 38#include <unistd.h> 39 | 1/* 2 * Copyright (c) 2014 Spectra Logic Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32 * $FreeBSD$ 33 */ 34 35#include <errno.h> 36#include <stdio.h> 37#include <stdlib.h> 38#include <unistd.h> 39 |
40#define RANDOM_MAX (((long)1<<31) - 1) | 40#define RANDOM_MAX ((1U<<31) - 1) |
41 42int main(int argc, char** argv){ 43 useconds_t max_usecs, usecs; 44 double frac; 45 46 if (argc != 2) { 47 printf("Usage: randsleep <max_microseconds>\n"); 48 exit(2); --- 15 unchanged lines hidden --- | 41 42int main(int argc, char** argv){ 43 useconds_t max_usecs, usecs; 44 double frac; 45 46 if (argc != 2) { 47 printf("Usage: randsleep <max_microseconds>\n"); 48 exit(2); --- 15 unchanged lines hidden --- |