<commit_before>package pl.elpassion.cloudtimer.domain

import android.os.Parcel
import android.os.Parcelable
import pl.elpassion.cloudtimer.currentTimeInMillis
import java.lang.System.currentTimeMillis
import java.util.*

data class Timer(val title: String, val duration: Long, val endTime: Long = currentTimeMillis() + duration, val uid: String = randomUUID(), val group: Group? = null, val timeLeft: Long? = null) : Parcelable{

    val finished: Boolean
        get() = endTime < currentTimeInMillis()

    companion object {
        fun randomUUID(): String = UUID.randomUUID().toString()
        final val CREATOR: Parcelable.Creator<Timer> = object : Parcelable.Creator<Timer> {

            override fun createFromParcel(parcel: Parcel): Timer {
                return Timer(parcel)
            }

            override fun newArray(size: Int): Array<Timer?> {
                return arrayOfNulls(size)
            }
        }
    }

    override fun describeContents(): Int = 0

    constructor(parcel: Parcel) : this(parcel.readString(), parcel.readLong(), parcel.readLong(),  parcel.readString(), parcel.readTypedObject(Group.CREATOR))

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(title)
        parcel.writeLong(duration)
        parcel.writeLong(endTime)
        parcel.writeString(uid)
        parcel.writeTypedObject(group, flags)
    }


}<commit_msg>- fix to Timer class to work on lower APIs<commit_after>package pl.elpassion.cloudtimer.domain

import android.os.Parcel
import android.os.Parcelable
import pl.elpassion.cloudtimer.currentTimeInMillis
import java.lang.System.currentTimeMillis
import java.util.*

data class Timer(val title: String, val duration: Long, val endTime: Long = currentTimeMillis() + duration, val uid: String = randomUUID(), val group: Group? = null, val timeLeft: Long? = null) : Parcelable{

    val finished: Boolean
        get() = endTime < currentTimeInMillis()

    companion object {
        fun randomUUID(): String = UUID.randomUUID().toString()
        final val CREATOR: Parcelable.Creator<Timer> = object : Parcelable.Creator<Timer> {

            override fun createFromParcel(parcel: Parcel): Timer {
                return Timer(parcel)
            }

            override fun newArray(size: Int): Array<Timer?> {
                return arrayOfNulls(size)
            }
        }
    }

    override fun describeContents(): Int = 0

    constructor(parcel: Parcel) : this(parcel.readString(), parcel.readLong(), parcel.readLong(),  parcel.readString(), parcel.readTypedObject(Group.CREATOR))

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(title)
        parcel.writeLong(duration)
        parcel.writeLong(endTime)
        parcel.writeString(uid)
        parcel.writeParcelable(group, flags)
    }


}
{'fraction_non_alphanumeric': 0.10435699226985243, 'fraction_numerical': 0.0007027406886858749, 'mean_word_length': 3.1320754716981134, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3868801', 'n_tokens_mistral': 843, 'n_tokens_neox': 821, 'n_words': 197}