# Poor man's digital clock

**URL:** <https://discourse.ats-lang.org/t/poor-mans-digital-clock/514>\
**Category:** Google Group\
**Created:** [June 24, 2015, 6:44am UTC](https://discourse.ats-lang.org/t/poor-mans-digital-clock/514 "2015-06-24T06:44:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [June 24, 2015, 6:44am UTC](https://discourse.ats-lang.org/t/poor-mans-digital-clock/514/1 "2015-06-24T06:44:51Z")

</div>

I have been doing more and more ATS+JS co-programming. Mostly it is for the  
purpose of  
teaching. I feel that people taking my class in general like this kind of  
stuff.

Here is a digital clock implemented in ATS + a bit of JS and HTML:

> <https://github.com/githwxi/ATS-Postiats-contrib/blob/master/projects/SMALL/JSclock/myclock2.html>

  

> <https://github.com/githwxi/ATS-Postiats-contrib/blob/master/projects/SMALL/JSclock/myclock2.dats>

This example is so straightforward that I think one should be able to  
follow it without much difficulty.

Here is a simple demo of the clock:

[http://ats-lang.sourceforge.net/COMPILED/doc/PROJECT/SMALL/JSclock/myclock2.html](http://ats-lang.sourceforge.net/COMPILED/doc/PROJECT/SMALL/JSclock/myclock2.html)

Have fun!

–Hongwei
