How to use homey.setTimeout in a custom class

Hi, I created a simple class to manage a timer in Homey that I call from app.js.

I would like to use the Homey setTimer method (this.homey.setTimer) inside the class instead of the standard method (I don’t know the difference but I imagine that the first one is optimized for Homey).
However, I can use it without problems inside a class that extends Homey.App, Homey.Driver or Homey.Device but I don’t know how to call it inside a custom class that doesn’t extend one of these three.

Thanks in advance,
Simone

Pass it as constructor argument:

this.myInstance = new MyClass(this.homey);

Or make your app instance “globally” available:

// app.js
async onInit() {
  Homey.app = this;
  ...
}

// my-class.js
const Homey = require('homey');
...
Homey.app.homey.setTimeout(...);

Thanks!