Incorrect handling of metrics by the delta() function in Grafana

I am using prometheus-cpp library , Prometheus v2.34, Grafana v8.4.5 and operating system Windows 10.

And I want to calculate the intensity of my application.
This application processes files.
I count the processing time of each file and send it to Prometheus as a counter.Increment(Processed_time).
Then in Grafana I use the delta() function to calculate the intensity.
The idea is this: if files were processed for 40 seconds in 1 minute, then the intensity is 40/60.
I am using the delta() function:

delta(application_time_total_sec{}[1m]) / (60*1)

But there are two problems:

  1. sometimes incorrect values ​​are obtained after the delta() function: they are greater than 1. It was as if my application worked 75 seconds in 1 minute))
    Incorrect results of delta() function

  2. If I want to increase the interval from 1 minute to 5 minutes, then I get crazy data.

delta(application_time_total_sec{}[5m]) / (60*5)

Am I using the delta() function incorrectly?

Its the difference between the first and last value right?

yes, delta() function gets the difference between the first and last value in the interval [1m], [5m] …

The difference between the first and last elements in an interval gives me the uptime of my application. If I divide this time on interval I get the intensity of my application.

is not it?