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 730B

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