Skip to content

Commit

Permalink
fix(time): Remove clicking time on atomic clock
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Mar 25, 2017
1 parent 7c797d5 commit 59a55ea
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="Toolwatch.Toolwatch" version="1.3.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="Toolwatch.Toolwatch" version="1.3.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Toolwatch - Watch accuracy app</name>
<description>Measure and track the accuracy of your mechanical watches. Toolwatch is a free watch accuracy app trusted by the watchmaking industry's leaders and 15 000+ monthly users. Is your watch accurate? Should it be serviced? How does it compare versus other watches? Find out now by measuring the accuracy of your watch!</description>
<author email="[email protected]" href="https://toolwatch.io/">Mathieu Nayrolles</author>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "toolwatch-mobile",
"author": "Mathieu Nayrolles",
"homepage": "https://toolwatch.io/",
"version": "1.3.4",
"version": "1.3.6",
"private": true,
"scripts": {
"ionic:build": "npm run assets && ionic-app-scripts build",
Expand Down
Binary file removed src/assets/sounds/tic.mp3
Binary file not shown.
Binary file removed src/assets/sounds/toc.mp3
Binary file not shown.
19 changes: 0 additions & 19 deletions src/pages/time/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export class TimePage extends ClockComponent{
loading:Loading;
twelveHoursFormat:boolean = true;
interval:any;
soundInterval:any;
tic = new Audio('assets/sounds/tic.mp3');
toc = new Audio('assets/sounds/toc.mp3');


constructor(
Expand Down Expand Up @@ -61,7 +58,6 @@ export class TimePage extends ClockComponent{

ionViewCanLeave():boolean {
clearInterval(this.interval);
clearInterval(this.soundInterval);
return true;
}

Expand All @@ -72,28 +68,13 @@ export class TimePage extends ClockComponent{
this.twapi.accurateTime().then(
date => {

let ms = this.date.getMilliseconds()

setTimeout(()=>{
this.soundInterval = setInterval(()=>{
ms = 0;
if(this.date.getSeconds() % 2 == 0){
this.tic.play();
}else{
this.toc.play();
}
}, 1000);
}, 990-ms)


this.interval = setInterval(()=>{
this.date = new Date(this.date.getTime() + this.intervalTime);
this.initLocalClocks();
},
this.intervalTime
);


setTimeout(()=>{
this.loading.dismiss()
});
Expand Down

0 comments on commit 59a55ea

Please sign in to comment.