(secs)
| 1147 | |
| 1148 | def create_converter(self, sec_to_unit): |
| 1149 | def converter(secs): |
| 1150 | floatpart, intpart = math.modf(secs) |
| 1151 | intpart = int(intpart) |
| 1152 | floatpart *= sec_to_unit |
| 1153 | floatpart = self.decimal_round(floatpart) |
| 1154 | if floatpart < 0: |
| 1155 | floatpart += sec_to_unit |
| 1156 | intpart -= 1 |
| 1157 | elif floatpart >= sec_to_unit: |
| 1158 | floatpart -= sec_to_unit |
| 1159 | intpart += 1 |
| 1160 | return (intpart, floatpart) |
| 1161 | return converter |
| 1162 | |
| 1163 | def test_object_to_timeval(self): |
nothing calls this directly
no test coverage detected