There are several ways to do rounding, but it sounds like you're looking to round up (round towards +infinity), which is also called the ceil
.
Since you have units of seconds and you want to get units of 10ns you need to divide by 10ns (1e-8, which is the same as multiplying by 1e8) then use the ceil function. For instance
double val = 123e-9;
int val10ns = ceil(val*1e8);
(this assumes that you have c99 ceil available, if not see here for an implementation)
Then if you want to output this as a string, you just need to convert 'val10ns' and append "0ns", like this
printf("val in units of 10ns: %d0ns\n", val10ns);
Lastly, you might want to do something to handle small values. For instance, 1e-90 seconds will still round up to 10ns. For instance you could first do a round to zero to get units of ns and then do a ceil to get units of 10ns.