UbiFunctions are billed on a per-million-executions basis. If any execution surpasses 2 seconds; then it is counted as 2 executions (or more, based on the time length of the execution). The cost is $5 per million Ubifunctions executions.
Be sure to keep this in mind when increasing the execution time. You can always check your UbiFunctions usage under your account profile.