Stay organized with collections
Save and categorize content based on your preferences.
StructTimeval
class StructTimeval
Corresponds to C's struct timeval
from sys/time.h
.
Summary
Properties |
Long |
Seconds.
|
Long |
Microseconds.
|
Public methods
equals
fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
hashCode
fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
toMillis
fun toMillis(): Long
toString
fun toString(): String
Return |
String |
a string representation of the object. |
Properties
tv_sec
val tv_sec: Long
Seconds.
tv_usec
val tv_usec: Long
Microseconds.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# StructTimeval\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nStructTimeval\n=============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/system/StructTimeval \"View this page in Java\") \n\n```\nclass StructTimeval\n```\n\n|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.system.StructTimeval](#) |\n\nCorresponds to C's `struct timeval` from `sys/time.h`.\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e |\n| static [StructTimeval](#) | [fromMillis](#fromMillis(kotlin.Long))`(`millis:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` \u003cbr /\u003e |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [toMillis](#toMillis())`()` \u003cbr /\u003e |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\n| Properties ||\n|------------------------------------------------------------------------------|-----------------------------------------------|\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [tv_sec](#tv_sec:kotlin.Long) Seconds. |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [tv_usec](#tv_usec:kotlin.Long) Microseconds. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun equals(other: Any?): Boolean\n```\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | the reference object with which to compare. |\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if this object is the same as the obj argument; `false` otherwise. |\n\n### fromMillis\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun fromMillis(millis: Long): StructTimeval\n```\n\n| Return ||\n|--------------------|------------------------------|\n| [StructTimeval](#) | This value cannot be `null`. |\n\n### hashCode\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hashCode(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |\n\n### toMillis\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toMillis(): Long\n``` \n\n### toString\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |\n\nProperties\n----------\n\n### tv_sec\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval tv_sec: Long\n```\n\nSeconds. \n\n### tv_usec\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval tv_usec: Long\n```\n\nMicroseconds."]]