return (int)((double)(GetFreeCardSpaceKb()/(double)GetTotalCardSpaceKb())*100);
The ARM CPU in our cameras has no floating point hardware, and most cameras have no hardware support for division either.
So,
floating point -> very slow
integer division -> slow
bit shift, multiplication -> ok.
The calculation in question is performed at least a dozen times per second and its precision is not critical: using integers allows for a tiny bit less CPU utilization.