Ability to use less than one second in time constraints.

tanutanu

Well-known member
Perhaps in the "seconds" selection field, you could add 0.9 through 0.1 if you scroll "back" from 0?
Probably a stopwatch constraint might accept decimal value when you pass it assigning in a decimal data type variable.
I noticed the stopwatch has decimal value internally. I get the time values twice in 10 ms time difference when I made an action block as a function, stopwatch.isWorking().
 

Attachments

  • IMG_20220120_121100.jpg
    IMG_20220120_121100.jpg
    167.2 KB · Views: 9
Last edited:

tanutanu

Well-known member
well, time of day constraint doesn't have no decimal, under point, ms value, so I understand what you want:)
So just wait 100 ms to 900ms on the top after entering the actions at this moment.
 
Thank you. Either way, after some testing, looks like headset buttons will no longer work for me like they used to, and it seems even the volume buttons may not be a good alternative for what I had planned. Still the experimentation has been enlightening on various timing topics.
 

tanutanu

Well-known member
Thank you. Either way, after some testing, looks like headset buttons will no longer work for me like they used to, and it seems even the volume buttons may not be a good alternative for what I had planned. Still the experimentation has been enlightening on various timing topics.
Sorry, I don't catch what you want to do:unsure:
How do you want to use the trigger buttons? Does the decimal(ms) waiting time work for a brief breaking time before your actions? If so, simply wait for a while after you pressed the buttons.
Or do you want to accept another trigger working as the 2 stroke key input while the brief moment? If so, my macro might help you:)
 
Sorry, I don't catch what you want to do:unsure:
How do you want to use the trigger buttons? Does the decimal(ms) waiting time work for a brief breaking time before your actions? If so, simply wait for a while after you pressed the buttons.
Or do you want to accept another trigger working as the 2 stroke key input while the brief moment? If so, my macro might help you:)
What I want to accomplish is to be able to detect single, double, triple and even quadruple presses on a headset button, and have MacroDroid react after waiting only 0.27 seconds. I can get it to count the presses, but I wasn't able to figure a way to do it without waiting a full second after the last press. Unfortunately it seems that after the last update to my phone, it reacts much more slowly to hardware headphone buttons than it used to, so there's no way to do what I used to use it for anyway. But thanks for your help!
 

tanutanu

Well-known member
What I want to accomplish is to be able to detect single, double, triple and even quadruple presses on a headset button, and have MacroDroid react after waiting only 0.27 seconds. I can get it to count the presses, but I wasn't able to figure a way to do it without waiting a full second after the last press. Unfortunately it seems that after the last update to my phone, it reacts much more slowly to hardware headphone buttons than it used to, so there's no way to do what I used to use it for anyway. But thanks for your help!
Gotcha:)
I confirmed the stopwatch can compare with around 30ms(0.03sec) minimum if you assign the value in decimal data type variable once, as I wrote in the comment #2. It is not so accurate, became almost double sometimes. I guess it delayed due to MD main process overhead or another.
However, in my opinion, it is enough small while waiting key press anymore, I think 0.5 sec waiting next would be balanced, even 1sec might be ok as my old macro experience. The wait interruption technique is helpful for 2nd or 3rd click.
I'm not sure why your cell became slow, the logic might help you. If interested, look into the macro:)
諦めないで;)
 
Last edited:
Top