Skip to content

Commit 7f2577c

Browse files
committed
docs: fix typos
1 parent 4298f27 commit 7f2577c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- feat: adds a `clockDriftMs` optional parameter to `Expiry.fromDeltaInMilliseconds` to add to the current time, typically used to specify the clock drift between the client's clock and the IC network clock.
88
- fix: account for clock drift when verifying the certificate freshness.
99
- feat: adds the `timeDiffMsecs` optional field to the `CreateCertificateOptions` interface, which allows you to adjust the current time when verifying the certificate freshness.
10-
- feat: adds the `getTimeDiffMsecs` function to the `HttpAgent` class, which returns the time difference in milliseconds between the client's clock and the IC network clock. It also adds the `getTimeDiffMsecs` function to handle the case where the `HttpAgent` is not an instance of `HttpAgent`.
10+
- feat: adds the `getTimeDiffMsecs` function to the `HttpAgent` class, which returns the time difference in milliseconds between the client's clock and the IC network clock. It also adds the `getTimeDiffMsecs` function to handle the case where the agent is not an instance of `HttpAgent`.
1111

1212
## [3.1.0] - 2025-07-24
1313

packages/agent/src/agent/http/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,8 @@ export class HttpAgent implements Agent {
13911391
* Returns the time difference in milliseconds between the client's clock and the IC network clock,
13921392
* after the clock has been synced using the {@link HttpAgent.syncTime} method
13931393
* or during agent creation if {@link HttpAgentOptions.shouldSyncTime} was set to `true`.
1394+
*
1395+
* If the time has not been synced, returns `0`.
13941396
*/
13951397
public getTimeDiffMsecs(): number {
13961398
return this.#timeDiffMsecs;
@@ -1413,10 +1415,10 @@ export function calculateIngressExpiry(
14131415
}
14141416

14151417
/**
1416-
* Retrieves the time different in milliseconds between the client's clock and the IC network clock.
1418+
* Retrieves the time difference in milliseconds between the client's clock and the IC network clock.
14171419
* See {@link HttpAgent.getTimeDiffMsecs} for more details.
14181420
* @param agent The agent to retrieve the `timeDiffMsecs` property from.
1419-
* @returns The time different in milliseconds between the client's clock and the IC network clock,
1421+
* @returns The time difference in milliseconds between the client's clock and the IC network clock,
14201422
* if the agent is an {@link HttpAgent} instance. `undefined` otherwise.
14211423
*/
14221424
export function getTimeDiffMsecs(agent: Agent | HttpAgent): number | undefined {

0 commit comments

Comments
 (0)