The stopclock Reference Manual

This is the stopclock Reference Manual, version 1.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri Sep 15 06:43:00 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 stopclock

stopclock is a library for measuring time using (stop)clocks

Author

Grolter <>

License

Apache 2.0

Version

1.0.1

Source

stopclock.asd.

Child Component

stopclock.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 stopclock/stopclock.asd

Source

stopclock.asd.

Parent Component

stopclock (system).

ASDF Systems

stopclock.


3.1.2 stopclock/stopclock.lisp

Source

stopclock.asd.

Parent Component

stopclock (system).

Packages

stopclock.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 stopclock

Source

stopclock.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-freeze (clock &body body)

Locally freezes the clock.

Package

stopclock.

Source

stopclock.lisp.


5.1.2 Ordinary functions

Function: accelerate (clock factor)

Accelerates the ‘speed’ of the ‘clock’ by ‘factor’ times, returns the ‘clock’ itself. ‘factor’ cannot be zero.

Package

stopclock.

Source

stopclock.lisp.

Function: adjust (clock seconds)

Adds ‘seconds’ seconds to the current time on the ‘clock’, returns the ‘clock’ itself.

Package

stopclock.

Source

stopclock.lisp.

Function: clock-p (object)
Package

stopclock.

Source

stopclock.lisp.

Function: copy-clock (instance)
Package

stopclock.

Source

stopclock.lisp.

Function: freeze (clock)

Freezes the ‘clock’: the time passed will be counted during ‘unfreeze’ if clock is running.

Package

stopclock.

Source

stopclock.lisp.

Function: make-clock (&key paused speed time-source time)
Package

stopclock.

Source

stopclock.lisp.

Function: pause (clock)

Pauses the ‘clock’, returns the ‘clock’ itself. Synonymous to ‘stop’ function.

Package

stopclock.

Source

stopclock.lisp.

Function: paused (clock)

Returns T if the ‘clock’ is paused and NIL if it is running.

Package

stopclock.

Source

stopclock.lisp.

Function: (setf paused) (clock)

Pauses the ‘clock’ if ‘state’ is T and runs it if ‘state’ is NIL.

Package

stopclock.

Source

stopclock.lisp.

Function: real-time ()
Package

stopclock.

Source

stopclock.lisp.

Function: reset (clock &key time speed paused run)

Resets the ‘clock’s state. By default, only the current time is reset to 0. You can specify a new state for the ‘:speed’, ‘:time’ and whether the clock should be ‘:paused’ or ‘:run’ (‘:paused’ takes precedence over ‘:run’).

Package

stopclock.

Source

stopclock.lisp.

Function: run (clock)

Runs the ‘clock’, returns the ‘clock’ itself. Synonymous to ‘start’ function.

Package

stopclock.

Source

stopclock.lisp.

Function: run-time ()
Package

stopclock.

Source

stopclock.lisp.

Function: speed (clock)

Returns the current ‘speed’ of the ‘clock’.

Package

stopclock.

Source

stopclock.lisp.

Function: (setf speed) (clock)

Sets the ‘speed’ of the ‘clock’ to the ‘new-speed’. ‘new-speed’ cannot be zero.

Package

stopclock.

Source

stopclock.lisp.

Function: start (clock)

Starts the ‘clock’, returns the ‘clock’ itself. Synonymous to ‘run’ function.

Package

stopclock.

Source

stopclock.lisp.

Function: stop (clock)

Stops the ‘clock’, returns the ‘clock’ itself. Synonymous to ‘pause’ function.

Package

stopclock.

Source

stopclock.lisp.

Function: time (clock)

Returns the current time on the ‘clock’.

Package

stopclock.

Source

stopclock.lisp.

Function: (setf time) (clock)

Sets the current time on the ‘clock’ to the ‘new-time’.

Package

stopclock.

Source

stopclock.lisp.

Function: toggle (clock)

Runs the ‘clock’ if it was paused and stops it otherwise, returns the ‘clock’ itself.

Package

stopclock.

Source

stopclock.lisp.

Function: unfreeze (clock)

Unfreezes the ‘clock’: the time during the freeze is added if clock was running before the freeze.

Package

stopclock.

Source

stopclock.lisp.


5.1.3 Generic functions

Generic Reader: clock (condition)
Package

stopclock.

Methods
Reader Method: clock ((condition zero-clock-speed-error))
Source

stopclock.lisp.

Target Slot

clock.


5.1.4 Standalone methods

Method: print-object ((clock clock) stream)
Source

stopclock.lisp.


5.1.5 Conditions

Condition: zero-clock-speed-error

Condition of setting the clock speed equal to zero.

Package

stopclock.

Source

stopclock.lisp.

Direct superclasses

error.

Direct methods

clock.

Direct slots
Slot: clock
Initform

(quote nil)

Initargs

:clock

Readers

clock.

Writers

This slot is read-only.

Slot: message
Initform

(quote "clock speed cannot be equal to zero.")

Initargs

:message


5.1.6 Structures

Structure: clock
Package

stopclock.

Source

stopclock.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: start-time
Readers

clock-start-time.

Writers

(setf clock-start-time).

Slot: pause-time
Readers

clock-pause-time.

Writers

(setf clock-pause-time).

Slot: speed
Readers

clock-speed.

Writers

(setf clock-speed).

Slot: time-source
Readers

clock-time-source.

Writers

(setf clock-time-source).

Slot: freeze
Readers

clock-freeze.

Writers

(setf clock-freeze).


5.2 Internals


5.2.1 Macros

Macro: a-now ()
Package

stopclock.

Source

stopclock.lisp.

Macro: with-a-clock-slots (clock &body body)
Package

stopclock.

Source

stopclock.lisp.


5.2.2 Ordinary functions

Reader: clock-freeze (instance)
Writer: (setf clock-freeze) (instance)
Package

stopclock.

Source

stopclock.lisp.

Target Slot

freeze.

Reader: clock-pause-time (instance)
Writer: (setf clock-pause-time) (instance)
Package

stopclock.

Source

stopclock.lisp.

Target Slot

pause-time.

Reader: clock-speed (instance)
Writer: (setf clock-speed) (instance)
Package

stopclock.

Source

stopclock.lisp.

Target Slot

speed.

Reader: clock-start-time (instance)
Writer: (setf clock-start-time) (instance)
Package

stopclock.

Source

stopclock.lisp.

Target Slot

start-time.

Reader: clock-time-source (instance)
Writer: (setf clock-time-source) (instance)
Package

stopclock.

Source

stopclock.lisp.

Target Slot

time-source.

Function: make-clock% (&key start-time pause-time speed time-source freeze)
Package

stopclock.

Source

stopclock.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   F   G   M   P   R   S   T   U   W  
Index Entry  Section

(
(setf clock-freeze): Private ordinary functions
(setf clock-pause-time): Private ordinary functions
(setf clock-speed): Private ordinary functions
(setf clock-start-time): Private ordinary functions
(setf clock-time-source): Private ordinary functions
(setf paused): Public ordinary functions
(setf speed): Public ordinary functions
(setf time): Public ordinary functions

A
a-now: Private macros
accelerate: Public ordinary functions
adjust: Public ordinary functions

C
clock: Public generic functions
clock: Public generic functions
clock-freeze: Private ordinary functions
clock-p: Public ordinary functions
clock-pause-time: Private ordinary functions
clock-speed: Private ordinary functions
clock-start-time: Private ordinary functions
clock-time-source: Private ordinary functions
copy-clock: Public ordinary functions

F
freeze: Public ordinary functions
Function, (setf clock-freeze): Private ordinary functions
Function, (setf clock-pause-time): Private ordinary functions
Function, (setf clock-speed): Private ordinary functions
Function, (setf clock-start-time): Private ordinary functions
Function, (setf clock-time-source): Private ordinary functions
Function, (setf paused): Public ordinary functions
Function, (setf speed): Public ordinary functions
Function, (setf time): Public ordinary functions
Function, accelerate: Public ordinary functions
Function, adjust: Public ordinary functions
Function, clock-freeze: Private ordinary functions
Function, clock-p: Public ordinary functions
Function, clock-pause-time: Private ordinary functions
Function, clock-speed: Private ordinary functions
Function, clock-start-time: Private ordinary functions
Function, clock-time-source: Private ordinary functions
Function, copy-clock: Public ordinary functions
Function, freeze: Public ordinary functions
Function, make-clock: Public ordinary functions
Function, make-clock%: Private ordinary functions
Function, pause: Public ordinary functions
Function, paused: Public ordinary functions
Function, real-time: Public ordinary functions
Function, reset: Public ordinary functions
Function, run: Public ordinary functions
Function, run-time: Public ordinary functions
Function, speed: Public ordinary functions
Function, start: Public ordinary functions
Function, stop: Public ordinary functions
Function, time: Public ordinary functions
Function, toggle: Public ordinary functions
Function, unfreeze: Public ordinary functions

G
Generic Function, clock: Public generic functions

M
Macro, a-now: Private macros
Macro, with-a-clock-slots: Private macros
Macro, with-freeze: Public macros
make-clock: Public ordinary functions
make-clock%: Private ordinary functions
Method, clock: Public generic functions
Method, print-object: Public standalone methods

P
pause: Public ordinary functions
paused: Public ordinary functions
print-object: Public standalone methods

R
real-time: Public ordinary functions
reset: Public ordinary functions
run: Public ordinary functions
run-time: Public ordinary functions

S
speed: Public ordinary functions
start: Public ordinary functions
stop: Public ordinary functions

T
time: Public ordinary functions
toggle: Public ordinary functions

U
unfreeze: Public ordinary functions

W
with-a-clock-slots: Private macros
with-freeze: Public macros