Q:

Is there a word for countable seconds, hours, days , months ,years?

I am a coder .
I want to write a function like
def process(dataframe, preiods=7, freq='hour') :
    ....

It can process dataframe by every preiods of freq .
But I think preiods is not a good word at here, preiods(plural preiod) looks stange too .
Do I use period correctly? If not, any good idea ?

A:

I will answer the underlying language question. What to name your variables may be governed by the naming conventions of the shop or the programming language.
The preposition by is not idiomatic in that locution. We say that something should happen every seven hours or every two minutes not "by every".
Your program is giving the caller the ability to specify the type of interval (hours, minutes, days, etc) and the length of the interval.  We can call "hours" and "minutes" an interval or an interval type, and "seven" a "length" or a  "frequency".
We want this to happen every {frequency} {interval type}.

Phone me every ten minutes.
Push this button every sixty seconds.
Send me an invoice every three months.

