hi
is there someone that know how can i write in C this part of program that i
wrote in shell in serctl (in the ping part of the prog when i do the command
"serctl ping URI") :
ping)
# error handling is hacked -- filter_fl should not
# consume positive status -- that should be done by
# calling app
if [ "$#" -ne 2 ] ; then
usage
exit 1
fi
TIMESTAMPS=`date "+%s.%N"`
print_status $TIMESTAMPS
RET=`fifo_cmd t_uac_dlg OPTIONS "$2" "." \
"From: sip:daemon@$SIP_DOMAIN" \
"To: <$2>" "Contact:
<sip:daemon@!!>" "." "." \
| head -1 `
TIMESTAMPE=`date "+%s.%N"`
print_status $TIMESTAMPE
TIME= echo "(${TIMESTAMPE} - ${TIMESTAMPS}) *1000" | bc -l
print_status $TIME
;;
thanks a lot
ps: i need the part of the fifo_cmd etc..., not the part of timestamp (but
if you know if there is the same date function in C please tell me ;) )