home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- Path: sparky!uunet!cs.utexas.edu!hellgate.utah.edu!lanl!davids
- From: davids@gardener.lanl.gov (David G. Simmons)
- Subject: Re: Help! I need the time in my stack
- Message-ID: <1992Dec21.151650.12038@newshost.lanl.gov>
- Originator: davids@feynman.lanl.gov
- Sender: news@newshost.lanl.gov
- Organization: Los Alamos National Laboratory
- References: <92356.01033234A6J53@CMUVM.CSV.CMICH.EDU> <1992Dec21.083357.8376@leland.Stanford.EDU>
- Date: Mon, 21 Dec 1992 15:16:50 GMT
- Lines: 52
-
-
- In article <1992Dec21.083357.8376@leland.Stanford.EDU>, brod@jessica.stanford.edu (Brodie Lockard) writes:
- |> In article <92356.01033234A6J53@CMUVM.CSV.CMICH.EDU> CHUCK WILLIAMS <34A6J53@CMUVM.CSV.CMICH.EDU> writes:
- |> >Hellooo netters,
- |> >
- |> >I'm thinking of creating a hypercard stack that will keep track
- |> >of the system users in the lab where I work. To do this I want
- |> >to grab the mac's time and input it when the person logs on; I also
- |> >would like to increment the time and make an alarm when the user
- |> >exceeds the time limit. This is a big requirement spec of mine,
- |>
- |> In your stack script:
- |>
- |> on openStack
- |> global timeIn, timeLimitInMinutes
- |> put the ticks into timeIn
- |> put 20 into timeLimitInMinutes --or whatever you want the limit to be
- |> ...
- |> end openStack
- |>
- |> on idle
- |> global timeIn, timeLimitInMinutes
- |> if (the ticks - timeIn) / 3600 > timeLimitInMinutes then
- |> answer "Time's up!" with "Goodbye"
- |> go home
- |> else
- |> ...
- |> end if
- |> pass idle
- |> end idle
- |>
- |> Brodie Lockard brod@jessica.stanford.edu
-
- The ticks are probably not the best unit of measure here, since, if I am
- not mistaken, tickas are *roughly* clock cycles, and can vary quite
- substatially, depending on what the machine is being asked to do.
- Using the seconds would be much easier and more reliable. (of course,
- if I am mistaken, I trust the net.wisdom to correct my erring ways ;-)
- --
-
- David G. Simmons
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | "Redneckness has got to be a disease. You catch it on your fingers and it |
- | just *crawls* right up your sleeves." -Lyle Lovett |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- These could not possibly be LANL's opinions. I have not filled out the required
- suite of forms in quadruplicate.
- --
-
- David G. Simmons
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | "Redneckness has got to be a disease. You catch it on your fingers and it |
-