Hallo Wastel,
Du verwendest einen vorzeichenbehafteten 8-Bit Wert als time_v Variable. Der Zahlenraum ist also auf -128 bis +127 beschränkt! Wenn Du die ms seit Systemstart berechnen möchstest, würde ich einen uint32_t vorschlagen:

Code:
uint32_t time(){
    uint32_t time_v = (uint32_t)clock_sec*1000 + (uint32_t)clock_ms;
    return time_v;
}
Oder mit weniger (expliziten) Typ-Umwandlungen:
Code:
uint32_t time(){
    uint32_t time_v = clock_sec;
    time_v *= 1000;
    time_v += clock_ms;
    return time_v;
}