aboutsummaryrefslogtreecommitdiffstats
path: root/extension/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'extension/time.c')
-rw-r--r--extension/time.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/extension/time.c b/extension/time.c
index e6b2b39f..01be7784 100644
--- a/extension/time.c
+++ b/extension/time.c
@@ -103,15 +103,12 @@ int plugin_is_GPL_compatible;
* on the platform
*/
static awk_value_t *
-do_gettimeofday(int nargs, awk_value_t *result)
+do_gettimeofday(int nargs, awk_value_t *result, struct awk_ext_func *unused)
{
double curtime;
assert(result != NULL);
- if (do_lint && nargs > 0)
- lintwarn(ext_id, _("gettimeofday: ignoring arguments"));
-
#if defined(HAVE_GETTIMEOFDAY)
{
struct timeval tv;
@@ -153,7 +150,7 @@ do_gettimeofday(int nargs, awk_value_t *result)
* did not complete successfully (perhaps interrupted)
*/
static awk_value_t *
-do_sleep(int nargs, awk_value_t *result)
+do_sleep(int nargs, awk_value_t *result, struct awk_ext_func *unused)
{
awk_value_t num;
double secs;
@@ -161,9 +158,6 @@ do_sleep(int nargs, awk_value_t *result)
assert(result != NULL);
- if (do_lint && nargs > 1)
- lintwarn(ext_id, _("sleep: called with too many arguments"));
-
if (! get_argument(0, AWK_NUMBER, &num)) {
update_ERRNO_string(_("sleep: missing required numeric argument"));
return make_number(-1, result);
@@ -212,8 +206,8 @@ do_sleep(int nargs, awk_value_t *result)
}
static awk_ext_func_t func_table[] = {
- { "gettimeofday", do_gettimeofday, 0 },
- { "sleep", do_sleep, 1 },
+ { "gettimeofday", do_gettimeofday, 0, 0, awk_false, NULL },
+ { "sleep", do_sleep, 1, 1, awk_false, NULL },
};
/* define the dl_load function using the boilerplate macro */