If your Delphi-7 is not trimmed, then it has Indy. Otherwise, this set can be supplied - it is freely available. In subsequent versions of Delphi, it is present and quite useful at times.
If I understand the question correctly, the implementation will be something like this:
On the Indy Clients tab (sometimes just Indy ) there is a TIdSNTP component, we add it to the form, in the host property exposes the server we need (let it be 0.europe.pool.ntp.org ). Now your procedure will look like this:
procedure TsinhForm.Button1Click(Sender: TObject); var ST : _SYSTEMTIME; y,m,d,h,mi,s,ms : word; dt:TDateTime; begin try dt:=IdSNTP1.DateTime; except //обрабатываем ошибки end; DecodeDate(dt,y,m,d); DecodeTime(dt, h, mi, s, ms); ST.wYear := y; ST.wMonth := m; ST.wDay := d; ST.wHour := h; ST.wMinute := mi; ST.wSecond := s; SetSystemTime(ST); end;