total time the bulb is on , through all repeats , assuming it 's on when entering this element . concode_field_sep List<Element> subs concode_elem_sep PrintStream ps concode_elem_sep long timeon concode_elem_sep boolean flip concode_elem_sep long timeleft concode_elem_sep long n concode_elem_sep Scanner sc concode_elem_sep int p concode_elem_sep char line[] concode_elem_sep long length concode_elem_sep long totaltime concode_elem_sep boolean success concode_elem_sep long repeat concode_elem_sep long timeoff concode_field_sep void timeto concode_elem_sep String pattern concode_elem_sep Element parseList concode_elem_sep void doit concode_elem_sep long totalTimeOff concode_elem_sep String toString concode_elem_sep int getInteger concode_elem_sep void main
long function ( ) { long loc0 ; if ( flip ) { long loc1 = repeat / 2 ; long loc2 = repeat - loc1 ; loc0 = timeon * loc2 + timeoff * loc1 ; } else { loc0 = timeon * repeat ; } return loc0 ; }