Monitoring du Phytotron
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fake-values.c 682B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * fake-values.c
  3. */
  4. #include <stdio.h>
  5. #include <unistd.h>
  6. #include <stdlib.h>
  7. #include "funcs.h"
  8. int verbosity;
  9. /* --------------------------------------------------------------- */
  10. int main(int argc, char *argv[])
  11. {
  12. int opt;
  13. int type = 0;
  14. while ((opt = getopt(argc, argv, "vst:")) != -1) {
  15. switch (opt) {
  16. case 'v': verbosity++; break;
  17. case 's': srand(getpid()); break;
  18. case 't': type = atoi(optarg); break;
  19. default: break;
  20. }
  21. }
  22. if (verbosity > 1) {
  23. fprintf(stderr, "fake values - %s %s\n", __DATE__, __TIME__);
  24. }
  25. printf("%f %d\n", dtime(), random1000(type));
  26. return 0;
  27. }
  28. /* --------------------------------------------------------------- */