# Problem when trying to send 10 messages/second

**URL:** <https://forums.digi.com/t/problem-when-trying-to-send-10-messages-second/19672>\
**Category:** XBee Programamble (S2C & 900 HP)\
**Tags:** latency, xbee-programmable, s2c, transparent-mode\
**Created:** [July 2, 2018, 3:49pm UTC](https://forums.digi.com/t/problem-when-trying-to-send-10-messages-second/19672 "2018-07-02T15:49:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iagreen](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@iagreen](https://forums.digi.com/u/iagreen)\
**Post date:** [July 2, 2018, 3:49pm UTC](https://forums.digi.com/t/problem-when-trying-to-send-10-messages-second/19672/1 "2018-07-02T15:49:00Z")

</div>

Hi. I’m new to XBee. I’m using XBee S2C programable as router and XBee S2C PRO as coordinator, all in transparent mode.

My router is programed to send a message each delay\_ticks(25)[=0.1s], but I’m receiving 10 messages/second during 7 seconds and in the 8th I receive 11. It seems that I’m accumulating a delay during 7s that allows an extra data to be sent each 8s, without interfering with the following second.

Is there a way to correct this mistake and make sure I always send 10 messages/s, like a more precise delay?

Piece of the code:  
for (;😉  
{  
now = rtc\_get\_ms\_uptime();

```
	// Check that message has not been sent yet
	if (now != before)
	{
		before = now;
		
		// Send information packet if XBee has joined the network
		if (joined)
		{
			env.length = sprintf(tx_buf, "%i", new);
			xbee_transparent_serial(&amp;env);
			if (new &lt; 9) 
				new++;
			else 
				new = 0;
		}
	}
	
	// Delay T = 0.1s (1 tick corresponds to 4ms)
	delay_ticks(25);
	
	// Reset internal counters
	sys_watchdog_reset();
	sys_xbee_tick();
}

```

Thanks for the input!
