You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sleep.rs
    path of file: ./repos/rustybox/coreutils
    
    the code of the file until where you have to start completion: use libc;
use libc::sleep;
extern "C" {

  #[no_mangle]
  fn strncasecmp(_: *const libc::c_char, _: *const libc::c_char, _: libc::c_ulong) -> libc::c_int;

}
pub type duration_t = libc::c_double;

/*
 * sleep implementation for busybox
 *
 * Copyright (C) 2003  Manuel Novoa III  <mjn3@codepoet.org>
 *
 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
 */
/* Mar 16, 2003      Manuel Novoa III   (mjn3@codepoet.org)
 *
 * Rewritten to do proper arg and error checking.
 * Also, added a 'fancy' configuration to accept multiple args with
 * time suffixes for seconds, minutes, hours, and days.
 */
//config:config SLEEP
//config:	bool "sleep (2 kb)"
//config:	default y
//config:	help
//config
    
pub unsafe fn sleep_main(mut _argc: libc::c_int, mut argv: *mut *mut libc::c_char) -> libc::c_int {
  let mut duration: duration_t = 0.;
  argv = argv.offset(1);
  if (*argv).is_null() {
    crate::libbb::appletlib::bb_show_usage();
  }
  /* GNU sleep accepts "inf", "INF", "infinity" and "INFINITY" */
  if strncasecmp(
    *argv.offset(0),
    b"inf\x00" as *const u8 as *const libc::c_char,
    3i32 as libc::c_ulong,
  ) == 0
  {
    loop {
      sleep(2147483647i32 as libc::c_uint);
    }
  }
  /* undo busybox.c setlocale */
  duration = 0 as duration_t;
  loop {
    duration += crate::libbb::duration::parse_duration_str(*argv);
    argv = argv.offset(1);
    if (*argv).is_null() {
      break;
    }
  }
  crate::libbb::duration::sleep_for_duration(duration);
  /* simple */
  return 0;
}