# getTimeIn

:::caution[Unreleased]
Not in `@northguild/gmt` 1.20.0 on npm yet. It is on `main` and ships in the next release.
:::

## Signature

```ts
getTimeIn(units: Partial<Record<"hours" | "minutes" | "seconds" | "milliseconds" | "microseconds" | "nanoseconds", number>>): string
```

Return the PlainTime after now, as an ISO string, counted from the current time.

- Reads the clock once, after `units` is checked.
- `units` is an object of unit amounts (hours to nanoseconds), such as `{ minutes: 15 }`. A duration string returns "". A fractional amount returns "": write `{ minutes: 90 }` for an hour and a half.
- Lengths are unsigned: a negative amount returns "". `getTimeAgo` is the other direction.
- A date unit returns "", even at zero.
- Wraps at midnight and carries no day, so `getTimeIn({ hours: 24 })` is the time now. For a moment that keeps its date, use `getDateTimeIn` or `getZonedIn`.
- Counts from now in the system time zone. Whole seconds, floored. For sub-second digits, use `addDateTime(getNow(), units)`, which also keeps the date.
- Examples read the clock at 2027-06-15T12:00:00Z, with the system time zone UTC.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `units` | `Partial<Record<"hours" \| "minutes" \| "seconds" \| "milliseconds" \| "microseconds" \| "nanoseconds", number>>` | unit amounts, such as `{ minutes: 15 }`; never negative |

## Returns

ISO PlainTime string in whole seconds, or "" for invalid `units`, a date unit, a negative amount or an unavailable system zone

## Related types

- [`TimeDurationUnit`](/gmt/reference/types/TimeDurationUnit)

## Examples

```ts
import { getTimeIn } from "@northguild/gmt/plain/get";

getTimeIn({ minutes: 15 }) // "12:15:00"
```

## Source

[plain/get/getTimeIn.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/plain/get/getTimeIn.ts)
