Help for this page

Select Code to Download


  1. or download this
    my $server_root_dispersion_binary =  substr($received_data, 64, 32);
    my $server_root_dispersion = oct("0b".$server_root_dispersion_binary);
    
  2. or download this
    my $server_root_dispersion = oct("0b" . substr($received_data, 64, 32)
    +);
    
  3. or download this
    my $server_precision = oct("0b" . substr($received_data, 24, 8));
    my $server_root_delay = oct("0b" . substr($received_data, 32, 32));
    
  4. or download this
    my $server_precision = oct("0b" . substr($received_data, 24, 8));
    my $server_root_delay = oct("0b" . substr($received_data, 24+8, 32));
    
  5. or download this
    my $server_precision = oct("0b" . substr($received_data, $here, ($widt
    +h = 8)));
    $here += $width;
    my $server_root_delay = oct("0b" . substr($received_data, $here, ($wid
    +th = 32)));
    $here += $width;
    
  6. or download this
    if ($received_data) {
       my $here = 0;
    ...
       my $server_mode = $next_value->(3);
       my $server_stratum = $next_value->(8);
       ...
    
  7. or download this
    if ($received_data) {
       my $here = 0;
    ...
            return oct("0b".substr($received_data, $start, $_));
         }
          (2, 3, 3, 8, ... )
    
  8. or download this
    my ($server_li, $server_vn, $server_mode, $server_stratum, ... )
         map { oct("0b".$_) } unpack 'a2a3a3a8...', $received_data
    
  9. or download this
    
    our (@fields, %width, $packt);
    ...
    %srv = ();
    @srv{@fields} = map { oct("0b".$_) } unpack $packt, $received_data;