Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: List service ACLs on Mac OS X 10.5 Server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: List service ACLs on Mac OS X 10.5 Server
Authored by: wallybear on Jul 20, '09 03:34:50PM
...or, if you prefer a binary executable, save the following code as "msleep.c":
---- snip -----------------

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  unsigned long    sleep_time;

  if (argc != 2)
  {
     printf("*** ERROR - insufficient parameters \n");
     printf("            usage: 'msleep <milliseconds>'\n");
     exit(1);
  }

// Get sleep_time from command line
  sleep_time = strtol(argv[1], NULL, 0);

// Sleep for sleep_time milliseconds
  usleep(sleep_time*1000); //usleep wants microseconds

  return(0);
}
---- snip -----------------
and compile it with the command gcc msleep.c -o msleep, it will create the msleep binary.

The sintax of msleep is: msleep <milliseconds> (e.g.: msleep 500 for a delay of 0.5 seconds)


[ Reply to This | # ]