Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert Kent toolchain hack from 2012 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 1 addition & 49 deletions modules/course/examples/bar.occ
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,7 @@
--

#INCLUDE "course.module"
--#INCLUDE "time.module"

--{{{ FUNCTION seconds
--* Convert seconds to timer ticks.
-- @param s Time in seconds
-- @return Time in timer ticks
INT INLINE FUNCTION seconds (VAL INT s)
INT ticks:
VALOF
#IF TARGET.BITS.PER.WORD = 16
ticks := s * 1000
#ELSE
ticks := s * 1000000
#ENDIF
RESULT ticks
:
--}}}

--{{{ FUNCTION milliseconds
--* Convert milliseconds to timer ticks.
-- @param ms Time in milliseconds
-- @return Time in timer ticks
INT INLINE FUNCTION milliseconds (VAL INT ms)
INT ticks:
VALOF
#IF TARGET.BITS.PER.WORD = 16
ticks := ms
#ELSE
ticks := ms * 1000
#ENDIF
RESULT ticks
:
--}}}

--{{{ FUNCTION microseconds
--* Convert microseconds to timer ticks.
-- @param us Time in microseconds
-- @return Time in timer ticks
INT INLINE FUNCTION microseconds (VAL INT us)
INT ticks:
VALOF
#IF TARGET.BITS.PER.WORD = 16
ticks := us / 1000
#ELSE
ticks := us
#ENDIF
RESULT ticks
:
--}}}
#INCLUDE "time.module"

--{{{ O.REQ protocol
PROTOCOL O.REQ
Expand Down