home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / hypercar / 4630 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.5 KB  |  65 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!cs.utexas.edu!hellgate.utah.edu!lanl!davids
  3. From: davids@gardener.lanl.gov (David G. Simmons)
  4. Subject: Re: Help! I need the time in my stack
  5. Message-ID: <1992Dec21.151650.12038@newshost.lanl.gov>
  6. Originator: davids@feynman.lanl.gov
  7. Sender: news@newshost.lanl.gov
  8. Organization: Los Alamos National Laboratory
  9. References: <92356.01033234A6J53@CMUVM.CSV.CMICH.EDU> <1992Dec21.083357.8376@leland.Stanford.EDU>
  10. Date: Mon, 21 Dec 1992 15:16:50 GMT
  11. Lines: 52
  12.  
  13.  
  14. In article <1992Dec21.083357.8376@leland.Stanford.EDU>, brod@jessica.stanford.edu (Brodie Lockard) writes:
  15. |> In article <92356.01033234A6J53@CMUVM.CSV.CMICH.EDU> CHUCK WILLIAMS <34A6J53@CMUVM.CSV.CMICH.EDU> writes:
  16. |> >Hellooo netters,
  17. |> >
  18. |> >I'm thinking of creating a hypercard stack that will keep track
  19. |> >of the system users in the lab where I work.  To do this I want
  20. |> >to grab the mac's time and input it when the person logs on; I also
  21. |> >would like to increment the time and make an alarm when the user
  22. |> >exceeds the time limit.  This is a big requirement spec of mine,
  23. |> 
  24. |> In your stack script:
  25. |> 
  26. |> on openStack
  27. |>   global timeIn, timeLimitInMinutes
  28. |>   put the ticks into timeIn
  29. |>   put 20 into timeLimitInMinutes --or whatever you want the limit to be
  30. |>   ...
  31. |> end openStack
  32. |> 
  33. |> on idle
  34. |>   global timeIn, timeLimitInMinutes
  35. |>   if (the ticks - timeIn) / 3600 > timeLimitInMinutes then
  36. |>     answer "Time's up!" with "Goodbye"
  37. |>     go home
  38. |>   else
  39. |>     ...
  40. |>   end if
  41. |>   pass idle
  42. |> end idle
  43. |> 
  44. |> Brodie Lockard      brod@jessica.stanford.edu
  45.  
  46. The ticks are probably not the best unit of measure here, since, if I am
  47. not mistaken, tickas are *roughly* clock cycles, and can vary quite
  48. substatially, depending on what the machine is being asked to do.
  49. Using the seconds would be much easier and more reliable. (of course,
  50. if I am mistaken, I trust the net.wisdom to correct my erring ways ;-)
  51. -- 
  52.  
  53. David G. Simmons
  54. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  55. | "Redneckness has got to be a disease.  You catch it on your fingers and it  | 
  56. | just *crawls* right up your sleeves." -Lyle Lovett                  |
  57. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  58. These could not possibly be LANL's opinions.  I have not filled out the required
  59. suite of forms in quadruplicate.
  60. -- 
  61.  
  62. David G. Simmons
  63. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  64. | "Redneckness has got to be a disease.  You catch it on your fingers and it  | 
  65.