This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am ovyerus on github. | |
* I am ovyerus (https://keybase.io/ovyerus) on keybase. | |
* I have a public key ASB85aXnzaKdL3MlfWXlFbzjgmYMQlHVJ_jDSftvZ_miGQo | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Timer { | |
constructor(func, time) { | |
if (typeof func !== 'function') throw new Error('func is not a function'); | |
if (typeof time !== 'number') throw new Error('time is not a number'); | |
this.timerObj = setInterval(func, time); | |
this.func = func; | |
this.time = time; | |
} | |
NewerOlder