I need to show hosts with uptime less than selected timeFilter

I am using Kibana 8.12. I need to create a visualization which shows the unique count of host which is having uptime less than equal to the selected timeFilter. uptime coming from metricset is in ms.

For example - If the timeFilter is selected as 24 hours, the number of hosts having uptime less than 24 hours should refect. Similarly if the filter is selected for 15 minutes, number of hosts with uptime less than 15 minutes should show.