TestimoX

API Reference

Class

NtpWriter

Namespace ComputerX.Time
Assembly ComputerX
Modifiers static

Writer for Windows Time (W32Time) client configuration. Sets Type (NTP/NT5DS/AllSync/NoSync), NtpServer (CSV; flags 0x9 used by default), and SpecialPollInterval. Optionally restarts the service.

Inheritance

  • Object
  • NtpWriter

Methods

public static Boolean Set(String computerName, String type, String[] servers, Nullable<Int32> specialPollInterval, Boolean restartService = false) #
Returns: Boolean

Applies NTP settings. Returns true when all writes succeed; restart and resync are best-effort.

Parameters

computerName System.String requiredposition: 0
Target host ("." or machine name).
type System.String requiredposition: 1
NTP, NT5DS, AllSync, or NoSync.
servers System.String[] requiredposition: 2
Server names (without flags). Will be encoded as server,0x9 by default.
specialPollInterval System.Nullable{System.Int32} requiredposition: 3
Seconds between polls in SpecialPoll mode. Null to skip.
restartService System.Boolean = false optionalposition: 4
Restart W32Time service after applying.