#!/bin/sh
: ; exec klone $0 "$@"
; The above line finds the klone executable in the $PATH
;;Skeleton of a typical klone script

(setq args (getopts "USAGE: %0 [options] 
without argument, return a number measuring the current absolute time in 
seconds (milliseconds with -ms).
With an argument, returns the time elapsed (in seconds) since the argument,
which must be the result of a precding curtime with the same -ms argument
Example:
    start_time=`curtime`
    letsdo; many; commands; here
    echo commands took `curtime $start_time` seconds.
WARNING: accuracy of the -ms option should not be overestimated
"
    ("-ms" () ms "times are given/accepted in milliseconds")
))

(defun main (&aux
  )
  (? 
    (if args 
      (- (if ms (mod (get-internal-run-time) *maxint*) (get-current-time))
	(Int (getn args 0))
      )
      (if ms (mod (get-internal-run-time) *maxint*) (get-current-time))
    )
    "\n"
  )
)

(main)

;;; EMACS MODES
;;; Local Variables: ***
;;; mode:lisp ***
;;; End: ***

