# HP Forums

Full Version: The weird clock
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It is not really a program, and it is not designed to be graphically perfect.
It’s just a way to use the TICKS function in a funny and simple way.

Steps to use:

0) Create a new program and paste the code below. Switch to RAD mode.

1) Set the time offset (will use Home variable T) with current time in HMS 12-hours format:
OFFSET(12°13′30″)

This sets the value to add to the number of ticks to obtain the current time.

2) Set the functions F1 to F4:
CLOCK

Warning! This will use F1, F2, F3, F4 of the Functions app. If they were storing previous values they will be lost without notification.

3) Launch the Function App and select equations F1 to F4 to be displayed in the Symbolic view.

4) Then open the Plot view and see your new weird clock! To refresh, quit the Plot view and come back again.
You don’t have to repeat steps 0 to 3 next time you need to know what time it is, simply press Plot.
Warning: I deny any responsibility in the event of a missed plane or train.

Enjoy!

Code:
``` TIME(); EXPORT CLOCK() BEGIN  F1 :='√(1-X^2)';  F2 := −F1;  F3 := 'TAN((−TIME/12+1/4)*2*π)*X+√(X*(6-TIME))*1ᴇ−6';  F4 := 'TAN((−FP(TIME)+1/4)*2*π)*X+√(X*(.5-FP(TIME)))*1ᴇ−6'; END; EXPORT TIME() BEGIN  RETURN (TICKS/1000/3600+T) MOD 12; END; EXPORT OFFSET(HMS) BEGIN  T:=HMS→(HMS-(TICKS/(1000*3600))); END;```
Here is the result.
[attachment=8765]
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :