There is no such action like what yuo've written, but it can be calculated by two triggers, and a bit of custom scripts:
#1
Event - Unit starts the effect of an ability
Cond - Ability = <YourAbility>
Actions -
Set ChannelEnd to false
Custom script - loop
Custom script - exitwhen udg_ChannelEnd == true *
Wait 1 second
Set TimeSpent = TimeSpent + 1 **
Custom script - endloop
Here, TimeSpent will give you the ammount of time spent.
#2
Event - Unit stops channeling an ability
Cond - Ability = <YourAbility>
Action -
Set ChannelEnd to true
* ChannelEnd is a boolean variable. You must put an 'udg_' tag in front of a global variable's name in JASS.
** TimeSpent is an integer variable. (Big surprise)