# \[APP\]\[Pro\] Chronograph - Adds precise timer, stopwatch and transition functionality to Homey

**URL:** <https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214>\
**Category:** Apps\
**Tags:** app, official, tools, homey-pro\
**Created:** [September 17, 2019, 5:55am UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214 "2019-09-17T05:55:42Z")\
**Posts on this page:** 1\
**Showing post:** 435

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 26, 2023, 11:04pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/435 "2023-02-26T23:04:39Z")

</div>

> [@Rrrr](#):
>
> can your script be modified to have two (or more) results (tags), for example:  
> // Convert milliSeconds to HH:MM:SS and HH:MM

The used homeyscript flowcards can only return one local tag atm. You’ll have to make a request at Athom’s for adding an additional tag to those homeyscript flowcards.

But, we can use HomeyScript tags as extra step, but these tags are global, so I suggest using the stopwatch/timer name as tag name. You can add multiple HS tags of course if needed.

```auto
// Convert milliSeconds to HH:MM:SS as result, and to HH:MM as tag
//
// ENTER STOPWATCH or TIMERNAME
let timerName = "YourTimerNameHere"
// END OF USER INPUT

// -> argument: input in milliseconds
let milliseconds = args[0]
let seconds = milliseconds / 1000;

if (seconds == '' || seconds == undefined) {
    console.log ('Missing argument');
    return(false);
} else {
  d = seconds;
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
}

  // Show as 'HH:MM'
  var clock_hhmm = ('0' + h).slice(-2) + ":" + ('0' + m).slice(-2);
  // Show as 'HH:MM:SS'
  var clock_hhmmss = ('0' + h).slice(-2) + ":" + ('0' + m).slice(-2) + ":" + ('0' + s).slice(-2);

  // Create homeyscript string tag for clock_hhmm
  timerName = timerName + '_clock_hhmm'
  await tag(timerName, clock_hhmm);
  
// just for checks
console.log(clock_hhmm);
//console.log(clock_hhmmss);

return(clock_hhmmss);

```

I used ‘Koelkastinterval’ as timerName, and you can see the Homeyscript tag is created and available to use in other cards

 ![Screenshot from 2023-02-27 00-49-12](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/0/101599d0d9df48b4e1328ee50d5f4ccfb7a10ba4.png)

---

_[View the full topic](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214)._
